-
-
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 the result of expression 5.45 + "3.2"?
A) The double value 8.6B) The string ""8.6"C) The long value 8.D) The String "5.453.2"
-
-
Which of the following statements accurately describe the use of access modifiers within a class definition? (Select multiple)
A) They can be applied to both data & methodsB) They must precede a class's data variables or methodsC) They can follow a class's data variables or methodsD) They can appear in any orderE) They must be applied to data variables first and then to methods
-
Which of the following statements can be used to describe a public method? (Select multiple)
A) It is accessible to all other classes in the hierarchyB) It is accessablde only to subclasses of its parent classC) It represents the public interface of its classD) The only way to gain access to this method is by calling one of the public class methods
-
-
Fill in the blanks :- The main subclass of the Exception class is _______ class.
A) RuntimeException
-
-
Name interfaces without a method? (Select multiple)
A) SerializableB) ClonebleC) RemoteD) UserDefined
-
-
State true or false :- Can we declare variable inside a method as final variables?
A) TrueB) FalseExplanation: because, local variable cannot be declared as final variables
-
What are the constants defined by Byte, Short, Integer and Long? 1. MAX_VALUE,2. MIN_VALUE3. TYPE.
A) 1, 2B) 2, 3C) 1, 2, 3D) 1, 3
-
Which of the following are true? (Select multiple)
A) The Class class is the superclass of the Object class.B) The Object class is final.C) The Class class can be used to load other classes.D) The ClassLoader class can be used to load other classes.
-
What is true regarding the uses of servlets
A) A servlet can handle multiple requests concurrently, and can synchronize requests. This allows servlets to support systems such as on-line conferencing.B) Servlets can forward requests to other servers and servlets.C) Servlets can be used to balance load among several servers that mirror the same content, and to partition a single logical service over several servers, according to task type or organizational...
-
Which of these is the correct format to use to create the literal char value a?
A) 'a'B) "a"C) new Character(a)D) 00a
-
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
-
-
Java compiler is an executable code
A) TrueB) FalseExplanation: It is NOT an Execuatable Code. It is a Bytecode
-
Java Virtual Machine is an interpreter for bytecode
A) TrueB) False
Java Interview Questions
Ans