-
What do you mean by static methods?
By using the static method there is no need creating an object of that class to use that method. We can directly call that method on that class. For example, say class A has static function f(), then we can call f() function as A.f(). There is no need of creating an object of class A.
-
-
What class allows you to read objects directly from a stream?
The ObjectInputStream class supports the reading of objects from input streams.
-
How are this() and super() used with constructors?
This() is used to invoke a constructor of the same class. super() is used to invoke a superclass constructor.
-
How is it possible for two String objects with identical values not to be equal under the == operator?
The == operator compares two objects to determine if they are the same object in memory. It is possible for two String objects to have the same value, but located indifferent areas of memory.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Java Interview Questions
Ans