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);} } Compilation Error 10 None of these 50 Compilation Error 10 None of these 50 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Size of int in Java is Depends on execution environment 16 bit 64 bit 32 bit Depends on execution environment 16 bit 64 bit 32 bit 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); }} None of these 12 4 5 11 None of these 12 4 5 11 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 shorter than source type. 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. All of these Two type are compatible and size of destination type is shorter than source type. 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. All 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); } } 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 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 34 S Throws exception. S Does not compile as Integer and String are API class names. 34 34 S Throws exception. S Does not compile as Integer and String are API class names. ANSWER DOWNLOAD EXAMIANS APP