Data Types and Variables Which of the following automatic type conversion will be possible? long to int short to int byte to int int to long long to int short to int byte to int int to long 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 ) ; }} 21 20 Throws Exception Compilation Error 22 21 20 Throws Exception Compilation Error 22 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. int i = 010;4. int j = 07;5. System.out.println(i);6. System.out.println(j);7. }8. } 8 7 Compilation fails with an error at line 5 Compilation fails with an error at line 3 10 7 None of these 8 7 Compilation fails with an error at line 5 Compilation fails with an error at line 3 10 7 None of these ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables In Java byte, short, int and long all of these are Both of the above None of these signed unsigned Both of the above None of these signed unsigned 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); }} 2 None of these -127 129 Compiler error 2 None of these -127 129 Compiler error 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 Compilation Error float double Exception is thrown at runtime Compilation Error float double ANSWER DOWNLOAD EXAMIANS APP