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); }} float double Compilation Error Exception is thrown at runtime TRUE ANSWER : ? YOUR ANSWER : ?
Size of float and double in Java is 64 and 64 32 and 64 64 and 32 32 and 32 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output for the below code ?1. public class Test{2. public static void main(String[] args){3. byte i = 128;4. System.out.println(i);5. }6. } Compilation fails with an error at line 3 0 None of these Compilation fails with an error at line 4 128 TRUE ANSWER : ? YOUR ANSWER : ?
The smallest integer type is ......... and its size is ......... bits. short, 16 short, 16 short, 8 byte, 8 TRUE ANSWER : ? YOUR ANSWER : ?
In Java byte, short, int and long all of these are None of these unsigned signed Both of the above TRUE ANSWER : ? YOUR ANSWER : ?
The following fraction of codedouble STATIC = 2.5 ;System.out.println( STATIC ); Prints 2.5 Rraises an error as STATIC is used as a variable which is a keyword Raises an exception None of these TRUE ANSWER : ? YOUR ANSWER : ?
What is the output of the following program?public class Test{static int x = 10 ; public static void main(String[] a){ Test test = new Test( ) ; Test test1 = new Test( ) ; test.x += 1 ; System.out.println( test.x + test1.x ) ; }} 20 21 Compilation Error 22 Throws Exception TRUE ANSWER : ? YOUR ANSWER : ?
What will be output of the following program code?public class Test{public static void main(String[] a){short x = 10;x = x*5;System.out.print(x);} } Compilation Error 10 None of these 50 TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following automatic type conversion will be possible? byte to int short to int int to long long to int TRUE ANSWER : ? YOUR ANSWER : ?