Search
.Management Sciences
Category: Java concepts and its programming
If method have same name as class name and method don’t have any return type then it is known as______________?
A. Constructor
B. Destructors
C. Variable
D. Object
The following fraction of code double STATIC = 2.5 ; System.out.println( STATIC ); ?
A. Prints 2.5
B. Raises an exception
C. Raises an error as STATIC is used as a variable which is a keyword
D. None of these
Which method of java is invoked by JVM to reclaim the inaccessible memory location ?
A. reclaim() method
B. finalize() method
C. final() method
D. both b and c
A method within a class is only accessible by classes that are defined within the same package as the class of the method. Which one of the following is used to enforce such restriction ?
A. Declare the method with the keyword public.
B. Declare the method with the keyword private.
C. Do not declare the method with any accessibility modifiers.
D. Declare the method with the keyword public and private.
Program which executes applet is known as________________?
A. JVM
B. virtual machine
C. applet engine
D. None of above
In which we clone the object and their constituent parts_______________?
A. Deep cloning
B. Shallow cloning
C. Both of above
D. None of above
Which of the following below are valid isolation levels in J2EE ?
A. TRANSACTION_READ_UNCOMMITTED
B. TRANSACTION_SERIALIZABLE
C. Only A
D. Both A and B
The smallest integer type is _____________ and its size is____________ bits?
A. short, 8
B. byte, 8
C. short, 16
D. short, 16
The following program: public class Test{ static boolean is OK; public static void main(String args[]){System.out.print(is OK); } } ?
A. Prints true
B. Prints false
C. Will not compile as boolean is not initialized
D. Will not compile as boolean can never be static
Recent Comments