finalize() method is also called Finalizer. It gets invoked when JVM figures out that this particular instance should be garbage collected. It may perform any operations, including bringing the object back to life.
Objects dynamically created using new operator are deallocated automatically. The technique that accomplishes this is called garbage collection. It works like this: when no references to an object exist, that object is assumed to be no longer needed, and the memory occupied by the object can be reclaimed.
When a class is derived from a base class, the derived class inherits all the characteristics of base class and can add new features as refinements and improvements. This is called inheritance.
The classes defined within another class are known as nested classes. The scope of a nested class is bounded by the scope of its enclosing class. Thus, if class B is defined within class A, then B does not exist independently of A.
String class represents character strings. All string literals in Java programs, such as
"abc", are implemented as instances of this class.
There may be the situation where you will want to pass information into a program when you run it. This is accomplished by passing command-line arguments to main( ).
An array is a group of like-typed variables that are referred to by a common name. Array of any type can be created and may have one or more dimensions. Arrays offer a convenient means of grouping related information.
Method overloading is one of the ways that Java supports polymorphism.
Java allows objects to initialize themselves when they are created. This automatic initialization is performed through the use of a constructor. This fulfills the requirement for initialization of object upon creation.
A class is a template for an object, and an object is an instance of a class. Once a class is defined, this new type can be used to create objects of that type. The class is at the core of Java.