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 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 Prints true ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Which of the following automatic type conversion will be possible? int to long long to int byte to int short to int int to long long to int byte to int short to int ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What would be the output of the following fraction of code ?int Integer = 34 ;char String = 'S' ;System.out.print( Integer ) ;System.out.print( String ) ; 34 Does not compile as Integer and String are API class names. Throws exception. 34 S S 34 Does not compile as Integer and String are API class names. Throws exception. 34 S S ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Automatic type conversion in Java takes place when Two type are compatible and size of destination type is equal of source type. Two type are compatible and size of destination type is larger than source type. Two type are compatible and size of destination type is shorter than source type. All of these Two type are compatible and size of destination type is equal of source type. Two type are compatible and size of destination type is larger than source type. Two type are compatible and size of destination type is shorter than source type. All of these 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); }} 4 5 12 11 None of these 4 5 12 11 None of these ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables How many primitive data types are there in Java? 6 8 7 9 6 8 7 9 ANSWER DOWNLOAD EXAMIANS APP