What are synchronized methods and synchronized statements?
Synchronized blocks place locks for shorter periods than synchronized methods.
Synchronized blocks place locks for shorter periods than synchronized methods.
We cannot inherit a constructor. That is, you cannot create a instance of a subclass using a constructor of one of it’s superclasses. One of the main reasons is because you probably don’t want...
Java’s interface can be used to implement multiple inheritance, with one important difference from c++ way of doing multiple inheritance: the inherited interfaces must be abstract. This obviates the need to choose between different...
Java’s interface can be used to implement multiple inheritance, with one important difference from c++ way of doing multiple inheritance: the inherited interfaces must be abstract. This obviates the need to choose between different...
Everything is an object in Java( Single root hierarchy as everything gets derived from java.lang.Object). Java does not have all the complicated aspects of C++ ( For ex: Pointers, templates, unions, operator overloading, structures...
FINAL for a variable : value is constant FINAL for a method : cannot be overridden FINAL for a class : cannot be derived A final variable cannot be reassigned, but it is not...
Class Object is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class. protected Object clone(): Creates and returns a copy...
A class or a method qualified with “abstract” keyword is an abstract class or abstract method. You create an abstract class when you want to manipulate a set of classes through a common interface....
equals methods checks for the content of the string objects while == checks for the fact that the two String objects point to same memory location ie they are same references. This methods belongs...
Recent Comments