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. } 14 21 Compilation fails with an error at line 4 Compilation fails with an error at line 6 None of these 14 13 14 21 Compilation fails with an error at line 4 Compilation fails with an error at line 6 None of these 14 13 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Size of int in Java is 32 bit 64 bit Depends on execution environment 16 bit 32 bit 64 bit Depends on execution environment 16 bit 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 Compilation Error Throws Exception 22 20 21 Compilation Error Throws Exception 22 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); }} 5 12 11 None of these 4 5 12 11 None of these 4 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables In Java byte, short, int and long all of these are Both of the above signed None of these unsigned Both of the above signed None of these unsigned ANSWER DOWNLOAD EXAMIANS APP
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