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); }} 12 None of these 11 4 5 12 None of these 11 4 5 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Determine output:public class Test{int i = 34;public static void main(String args[]){Test t1 = new Test();Test t2 = new Test();t1.i = 65;System.out.print(t1.i);System.out.print(t2.i);}} 34 65 65 34 65 65 34 34 34 65 65 34 65 65 34 34 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Size of int in Java is 64 bit 16 bit 32 bit Depends on execution environment 64 bit 16 bit 32 bit Depends on execution environment 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 true 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 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What is the output of the following program?public class Test{static int x = 10 ; public static void main(String[] a){ Test test = new Test( ) ; Test test1 = new Test( ) ; test.x += 1 ; System.out.println( test.x + test1.x ) ; }} 21 Compilation Error 22 Throws Exception 20 21 Compilation Error 22 Throws Exception 20 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The smallest integer type is ......... and its size is ......... bits. short, 8 byte, 8 short, 16 short, 16 short, 8 byte, 8 short, 16 short, 16 ANSWER DOWNLOAD EXAMIANS APP