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); }} 3 0 2.5 2 25 3 0 2.5 2 25 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables In Java, the word true is ................ A Java keyword A Boolean literal Same as value 1 Same as value 0 A Java keyword A Boolean literal Same as value 1 Same as value 0 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Determine output:class A{ public static void main(String args[]){ int x; x = 10; if(x == 10){ int y = 20; System.out.print("x and y: "+ x + " " + y); y = x*2; } y = 100; System.out.print("x and y: " + x + " " + y); }} 10 20 10 10 10 20 10 100 Error 10 20 10 20 10 20 10 10 10 20 10 100 Error 10 20 10 20 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); }} 11 5 4 12 None of these 11 5 4 12 None of these 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); }} Compiler error None of these 2 129 -127 Compiler error None of these 2 129 -127 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The smallest integer type is ......... and its size is ......... bits. short, 8 short, 16 byte, 8 short, 16 short, 8 short, 16 byte, 8 short, 16 ANSWER DOWNLOAD EXAMIANS APP