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 50 None of these 10 Compilation Error 50 None of these 10 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The smallest integer type is ......... and its size is ......... bits. short, 16 short, 16 short, 8 byte, 8 short, 16 short, 16 short, 8 byte, 8 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What will be output of following program?public class Test{ public static void main(String[] args){ byte b=127; b++; b++; System.out.println(b); }} None of these 2 Compiler error 129 -127 None of these 2 Compiler error 129 -127 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What will be the output for the below code ?1. public class Test{2. int i=8;3. int j=9;4. public static void main(String[] args){5. add();6. }7. public static void add(){8. int k = i+j;9. System.out.println(k);10. }11. } Compilation fails with an error at line 8 0 17 None of these Compilation fails with an error at line 5 Compilation fails with an error at line 8 0 17 None of these Compilation fails with an error at line 5 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What is the output for the below code ?1. public class Test{2. public static void main(String[] args){3. byte b = 6;4. b+=8;5. System.out.println(b);6. b = b+7;7. System.out.println(b);8. }9. } Compilation fails with an error at line 6 14 13 None of these Compilation fails with an error at line 4 14 21 Compilation fails with an error at line 6 14 13 None of these Compilation fails with an error at line 4 14 21 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); }} Exception is thrown at runtime double Compilation Error float Exception is thrown at runtime double Compilation Error float ANSWER DOWNLOAD EXAMIANS APP