Data Types and Variables Size of float and double in Java is 32 and 32 64 and 32 32 and 64 64 and 64 32 and 32 64 and 32 32 and 64 64 and 64 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What will be output of following program?public class Test{ public static void main(String[] args){ byte b=127; b++; b++; System.out.println(b); }} 2 -127 Compiler error 129 None of these 2 -127 Compiler error 129 None of these ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The following program:public class Test{ static boolean isOK; public static void main(String args[]){ System.out.print(isOK); } } Prints true Prints false Will not compile as boolean can never be static Will not compile as boolean is not initialized Prints true Prints false Will not compile as boolean can never be static Will not compile as boolean is not initialized ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Determine output:public class Test{ int a = 10; public void method(int a){ a += 1; System.out.println(++a); } public static void main(String args[]){ Test t = new Test(); t.method(3); }} 5 None of these 12 11 4 5 None of these 12 11 4 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Determine output:class A{ public static void main(String args[]){ int x; x = 10; if(x == 10){ int y = 20; System.out.print("x and y: "+ x + " " + y); y = x*2; } y = 100; System.out.print("x and y: " + x + " " + y); }} 10 20 10 100 10 20 10 20 10 20 10 10 Error 10 20 10 100 10 20 10 20 10 20 10 10 Error ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables 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. } None of these Compilation fails with an error at line 4 Compilation fails with an error at line 3 128 0 None of these Compilation fails with an error at line 4 Compilation fails with an error at line 3 128 0 ANSWER DOWNLOAD EXAMIANS APP