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 Will not compile as boolean is not initialized Will not compile as boolean can never be static Prints false Prints true Will not compile as boolean is not initialized Will not compile as boolean can never be static Prints false 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);} } None of these 50 10 Compilation Error None of these 50 10 Compilation Error 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. byte b = 6;4. b+=8;5. System.out.println(b);6. b = b+7;7. System.out.println(b);8. }9. } Compilation fails with an error at line 6 14 13 None of these Compilation fails with an error at line 4 14 21 Compilation fails with an error at line 6 14 13 None of these Compilation fails with an error at line 4 14 21 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Java is a ........... language. strongly typed moderate typed None of these weakly typed strongly typed moderate typed None of these weakly typed ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Determine output:public class Test{int i = 34;public static void main(String args[]){Test t1 = new Test();Test t2 = new Test();t1.i = 65;System.out.print(t1.i);System.out.print(t2.i);}} 34 34 65 34 65 65 34 65 34 34 65 34 65 65 34 65 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables How many primitive data types are there in Java? 6 9 7 8 6 9 7 8 ANSWER DOWNLOAD EXAMIANS APP