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 How many primitive data types are there in Java? 9 7 8 6 9 7 8 6 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Size of int in Java is Depends on execution environment 64 bit 32 bit 16 bit Depends on execution environment 64 bit 32 bit 16 bit 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 34 65 34 65 65 34 65 34 34 65 34 65 65 34 65 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 0 3 2 25 2.5 0 3 2 25 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Determine output:public class Test { static void test(float x){ System.out.print("float"); } static void test(double x){ System.out.print("double"); } public static void main(String[] args){ test(99.9); }} Compilation Error double Exception is thrown at runtime float Compilation Error double Exception is thrown at runtime float ANSWER DOWNLOAD EXAMIANS APP