-
Does a class inherit the constructors of its superclass
A class does not inherit constructors from any of its superclasses.
-
-
What is the serialization?
The serialization is a kind of mechanism that makes a class or a bean persistence by having its properties or fields and state information saved and restored to and from storage.
-
What will be the result of compiling the following code: public class Test {static int age;public static void main (String args []) {age = age + 1;System.out.println("The age is " + age);}}
A) Compiles and runs with no outputB) Compiles and runs printing out The age is 1C) Compiles but generates a runtime errorD) Does not compileE) Compiles but generates a compile time error
-
What is the difference between the paint() and repaint() methods
The paint() method supports painting via a Graphics object. The repaint() method is usedto cause paint() to be invoked by the AWT painting thread.
-
-
-
Which of the following holds true for the daemon thread, in java runtime,
A) Daemon thread is a low priority threadB) It runs intermittently in the backgroundC) It does the garbage collection operation for the java runtime system.D) All of the above
-
-
-
-
-
-
-
An interface contains __ methods
A) Non-abstractB) ImplementedC) unimplemented
-
Java Virtual Machine is an interpreter for bytecode
A) TrueB) False
-
-
The keywords const and goto are reserved but not used
A) TrueB) False
-
Which is the correct description of the OOPs principles?
A) Encapsulation:Is the Mechanism that binds together code and the data it manipulates, and keeps both safe from outside interference and misuse.B) Inheritance:Is the process by which one object acquires the properties of another object.C) Polymorphism:Is a feature that allows one interface to be used for a general class of actions.D) All the above
-
What is Java Beans ?
According to JavaSoft, "A Java Bean is a reusable software component that can be manipulated visually in a builder tool."
Java Interview Questions
Ans