Following quiz provides Multiple Choice Questions (MCQs) related to Core Java. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
True, Static functions can be accessed via class name or via null reference.
The long data type is represented by 64-bit two's complement integer.
Minimum value: -263
Maximum value: 263-1
String variable has default value of null if defined as an instance/static variable.
Q 4 - Which of the following is true about String?
String object is immutable so that once it is created a String object cannot be changed. Since String is immutable it can safely be shared between many threads which are considered very important for multithreaded programming.
It is not mandatory to have a default constructor in a class.
Q 6 - What is TreeSet Interface?
TreeSet is a Set implemented when we want elements in a sorted order.
Q 7 - What is true about a final class?
Final classes are created so the methods implemented by that class cannot be overridden. It can't be inherited. These classes are declared final.
Q 8 - Which is the way in which a thread can enter the waiting state?
A thread can enter the waiting state by invoking its sleep() method, by blocking on IO, by unsuccessfully attempting to acquire an object's lock, or by invoking an object's wait() method. It can also enter the waiting state by invoking its (deprecated) suspend() method.
No, constructor cannot be inherited.
Postfix operators i.e ()  . is at the highest precedence.