Data Types and Variables How many primitive data types are there in Java? 8 7 9 6 8 7 9 6 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 is not initialized Prints false Prints true Will not compile as boolean can never be static Will not compile as boolean is not initialized Prints false Prints true Will not compile as boolean can never be static ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What will be output of following program?public class Test{ public static void main(String[] args){ byte b=127; b++; b++; System.out.println(b); }} -127 129 None of these 2 Compiler error -127 129 None of these 2 Compiler error 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 shorter than 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 equal of source type. Two type are compatible and size of destination type is shorter than 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 smallest integer type is ......... and its size is ......... bits. short, 8 short, 16 byte, 8 short, 16 short, 8 short, 16 byte, 8 short, 16 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 ) ; S 34 34 S Throws exception. Does not compile as Integer and String are API class names. S 34 34 S Throws exception. Does not compile as Integer and String are API class names. ANSWER DOWNLOAD EXAMIANS APP