Data Types and Variables Determine output:class A{ public static void main(String args[]){ int x; x = 10; if(x == 10){ int y = 20; System.out.print("x and y: "+ x + " " + y); y = x*2; } y = 100; System.out.print("x and y: " + x + " " + y); }} 10 20 10 100 10 20 10 10 10 20 10 20 Error 10 20 10 100 10 20 10 10 10 20 10 20 Error ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables How many primitive data types are there in Java? 7 6 8 9 7 6 8 9 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Size of float and double in Java is 64 and 32 32 and 64 32 and 32 64 and 64 64 and 32 32 and 64 32 and 32 64 and 64 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The smallest integer type is ......... and its size is ......... bits. byte, 8 short, 8 short, 16 short, 16 byte, 8 short, 8 short, 16 short, 16 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. All of these 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. Two type are compatible and size of destination type is equal of source type. All of these Two type are compatible and size of destination type is larger than source type. 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); } } 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 Will not compile as boolean is not initialized ANSWER DOWNLOAD EXAMIANS APP