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 is not initialized Prints true Will not compile as boolean can never be static Prints false Will not compile as boolean is not initialized Prints true 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 10 Compilation Error 50 None of these 10 Compilation Error 50 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Java is a ........... language. None of these moderate typed strongly typed weakly typed None of these moderate typed strongly typed weakly typed ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Which of the following automatic type conversion will be possible? byte to int short to int int to long long to int byte to int short to int int to long long to int 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); }} 11 12 4 5 None of these 11 12 4 5 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. byte b = 6;4. b+=8;5. System.out.println(b);6. b = b+7;7. System.out.println(b);8. }9. } 14 21 Compilation fails with an error at line 6 Compilation fails with an error at line 4 None of these 14 13 14 21 Compilation fails with an error at line 6 Compilation fails with an error at line 4 None of these 14 13 ANSWER DOWNLOAD EXAMIANS APP