Data Types and Variables The following program:public class Test{ static boolean isOK; public static void main(String args[]){ System.out.print(isOK); } } Will not compile as boolean can never be static Prints true Will not compile as boolean is not initialized Prints false Will not compile as boolean can never be static Prints true Will not compile as boolean is not initialized Prints false 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); }} 12 11 5 4 None of these 12 11 5 4 None of these ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What is the output for the below code ?1. public class Test{2. public static void main(String[] args){3. int i = 010;4. int j = 07;5. System.out.println(i);6. System.out.println(j);7. }8. } 8 7 Compilation fails with an error at line 3 None of these Compilation fails with an error at line 5 10 7 8 7 Compilation fails with an error at line 3 None of these Compilation fails with an error at line 5 10 7 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Size of int in Java is 64 bit 16 bit Depends on execution environment 32 bit 64 bit 16 bit Depends on execution environment 32 bit ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Size of float and double in Java is 64 and 32 32 and 64 64 and 64 32 and 32 64 and 32 32 and 64 64 and 64 32 and 32 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables 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);} } 50 10 Compilation Error None of these 50 10 Compilation Error None of these ANSWER DOWNLOAD EXAMIANS APP