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); }} 0 2 2.5 3 25 0 2 2.5 3 25 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The smallest integer type is ......... and its size is ......... bits. short, 16 short, 8 byte, 8 short, 16 short, 16 short, 8 byte, 8 short, 16 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 ) ; }} 22 20 21 Throws Exception Compilation Error 22 20 21 Throws Exception Compilation Error ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The following fraction of codedouble STATIC = 2.5 ;System.out.println( STATIC ); Rraises an error as STATIC is used as a variable which is a keyword None of these Raises an exception Prints 2.5 Rraises an error as STATIC is used as a variable which is a keyword None of these Raises an exception Prints 2.5 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Size of int in Java is 64 bit 32 bit Depends on execution environment 16 bit 64 bit 32 bit Depends on execution environment 16 bit 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