Data Types and Variables How many primitive data types are there in Java? 6 9 7 8 6 9 7 8 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables In Java byte, short, int and long all of these are signed Both of the above None of these unsigned signed Both of the above None of these unsigned ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The smallest integer type is ......... and its size is ......... bits. short, 16 short, 16 byte, 8 short, 8 short, 16 short, 16 byte, 8 short, 8 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 false Will not compile as boolean can never be static Will not compile as boolean is not initialized Prints true Prints false Will not compile as boolean can never be static Will not compile as boolean is not initialized Prints true ANSWER DOWNLOAD EXAMIANS APP
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 10 10 20 10 100 Error 10 20 10 20 10 20 10 10 10 20 10 100 Error 10 20 10 20 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables In Java, the word true is ................ A Java keyword Same as value 0 A Boolean literal Same as value 1 A Java keyword Same as value 0 A Boolean literal Same as value 1 ANSWER DOWNLOAD EXAMIANS APP