Data Types and Variables Automatic type conversion in Java takes place when All of these Two type are compatible and size of destination type is larger than source type. Two type are compatible and size of destination type is shorter than source type. Two type are compatible and size of destination type is equal of source type. All of these Two type are compatible and size of destination type is larger than source type. Two type are compatible and size of destination type is shorter than source type. Two type are compatible and size of destination type is equal of source type. 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 Throws Exception 21 20 Compilation Error 22 Throws Exception 21 20 Compilation Error 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 129 2 None of these -127 Compiler error 129 2 None of these -127 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables How many primitive data types are there in Java? 8 7 6 9 8 7 6 9 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 3 0 2 25 2.5 3 0 2 25 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The smallest integer type is ......... and its size is ......... bits. byte, 8 short, 16 short, 8 short, 16 byte, 8 short, 16 short, 8 short, 16 ANSWER DOWNLOAD EXAMIANS APP