The following program:public class Test{ static boolean isOK; public static void main(String args[]){ System.out.print(isOK); } } Prints false Will not compile as boolean is not initialized Prints true Will not compile as boolean can never be static TRUE ANSWER : ? YOUR ANSWER : ?
Size of int in Java is 32 bit 64 bit Depends on execution environment 16 bit TRUE ANSWER : ? YOUR ANSWER : ?
The following fraction of codedouble STATIC = 2.5 ;System.out.println( STATIC ); Prints 2.5 None of these Rraises an error as STATIC is used as a variable which is a keyword Raises an exception TRUE ANSWER : ? YOUR ANSWER : ?
Determine output:public class Test { static void test(float x){ System.out.print("float"); } static void test(double x){ System.out.print("double"); } public static void main(String[] args){ test(99.9); }} Compilation Error float Exception is thrown at runtime double TRUE ANSWER : ? YOUR ANSWER : ?
What would be the output of the following fraction of code ?int Integer = 34 ;char String = 'S' ;System.out.print( Integer ) ;System.out.print( String ) ; 34 Does not compile as Integer and String are API class names. 34 S S Throws exception. TRUE ANSWER : ? YOUR ANSWER : ?
Size of float and double in Java is 64 and 32 64 and 64 32 and 32 32 and 64 TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following automatic type conversion will be possible? short to int byte to int int to long long to int TRUE ANSWER : ? YOUR ANSWER : ?
What will the output of the following program?public class Test{ public static void main(String args[]){ float f = (1 / 4) * 10; int i = Math.round(f); System.out.println(i); }} 3 2 0 2.5 25 TRUE ANSWER : ? YOUR ANSWER : ?
The smallest integer type is ......... and its size is ......... bits. short, 8 byte, 8 short, 16 short, 16 TRUE ANSWER : ? YOUR ANSWER : ?