Data Types and Variables Size of int in Java is 32 bit 16 bit 64 bit Depends on execution environment 32 bit 16 bit 64 bit Depends on execution environment ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What will be output of the following program code?public class Test{public static void main(String[] a){short x = 10;x = x*5;System.out.print(x);} } 10 50 Compilation Error None of these 10 50 Compilation Error None of these ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What is the output for the below code ?class A{ int k; boolean istrue; static int p; public void printValue(){ System.out.print(k); System.out.print(istrue); System.out.print(p); }}public class Test{ public static void main(String argv[]){ A a = new A(); a.printValue(); }} None of these 0 0 0 0 false 0 0 true 0 Compile error - static variable must be initialized before use. None of these 0 0 0 0 false 0 0 true 0 Compile error - static variable must be initialized before use. 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); }} None of these 4 12 5 11 None of these 4 12 5 11 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What will be the output for the below code ?1. public class Test{2. public static void main(String[] args){3. byte i = 128;4. System.out.println(i);5. }6. } Compilation fails with an error at line 3 Compilation fails with an error at line 4 None of these 128 0 Compilation fails with an error at line 3 Compilation fails with an error at line 4 None of these 128 0 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 0 3 25 2.5 2 0 3 25 2.5 ANSWER DOWNLOAD EXAMIANS APP