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.
The byte data type is represented by an 8-bit signed two's complement integer.
Minimum value: -128
Maximum value: 127
Q 2 - What is the size of boolean variable?
The boolean data type can take either true or false, but its "size" isn't precisely defined.
float variable has default value of 0.0f if defined as an instance/static variable.
Q 4 - Which of the following is true about super class?
All of the above are correct.
Inheritance represets IS-A relationship providing code reusablity . Consider the following statement: Circle is a Shape. Here Shape is super class and Circle is a child class extends the super class Shape.
Q 6 - What is TreeSet Interface?
TreeSet is a Set implemented when we want elements in a sorted order.
Q 7 - What is NullPointerException?
A NullPointerException is thrown when calling the instance method of a null object or modifying/accessing field of a null object.
Q 8 - What is Serialization?
Serialization is the process of writing the state of an object to a byte stream.
It is not necessary that each try block must be followed by a catch block. It should be followed by either a catch block or a finally block.
Postfix operators i.e ()  . is at the highest precedence.