Data Types and Variables In Java, the word true is ................ A Boolean literal A Java keyword Same as value 1 Same as value 0 A Boolean literal A Java keyword Same as value 1 Same as value 0 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The smallest integer type is ......... and its size is ......... bits. short, 16 byte, 8 short, 16 short, 8 short, 16 byte, 8 short, 16 short, 8 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); }} 5 12 11 None of these 4 5 12 11 None of these 4 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What will be the output for the below code ?1. public class Test{2. public static void main(String[] args){3. byte i = 128;4. System.out.println(i);5. }6. } Compilation fails with an error at line 4 128 0 Compilation fails with an error at line 3 None of these Compilation fails with an error at line 4 128 0 Compilation fails with an error at line 3 None 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); } } 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 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 ) ; Throws exception. 34 S 34 S Does not compile as Integer and String are API class names. Throws exception. 34 S 34 S Does not compile as Integer and String are API class names. ANSWER DOWNLOAD EXAMIANS APP