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 4 11 None of these 5 12 4 11 None of these ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The following fraction of codedouble STATIC = 2.5 ;System.out.println( STATIC ); None of these Raises an exception Rraises an error as STATIC is used as a variable which is a keyword Prints 2.5 None of these Raises an exception Rraises an error as STATIC is used as a variable which is a keyword Prints 2.5 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables In Java byte, short, int and long all of these are Both of the above signed unsigned None of these Both of the above signed unsigned None of these ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What will the output of the following program?public class Test{ public static void main(String args[]){ float f = (1 / 4) * 10; int i = Math.round(f); System.out.println(i); }} 2.5 25 3 2 0 2.5 25 3 2 0 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What will be output of the following program code?public class Test{public static void main(String[] a){short x = 10;x = x*5;System.out.print(x);} } Compilation Error 10 None of these 50 Compilation Error 10 None of these 50 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 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 ANSWER DOWNLOAD EXAMIANS APP