Java Basics

Anonymous Class in Java

Anonymous class in Java is a class without name. Its name is decided by the compiler. It enables us to declare and instantiate the class at the same time. It is like local class except that it does not have any name. We can use it only once. Anonymous class is also known as anonymous …

Anonymous Class in Java Read More »

Type Casting in Java

Converting one data type to another data type is known as type casting. Type Casting in Java is of two types i.e. Implicit Type Casting which is also known as Automatic Type Casting and Explicit Type Casting. Implicit or Automatic Type Casting In this, smaller data type is converted to bigger data type which is also …

Type Casting in Java Read More »