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 Which of the following automatic type conversion will be possible? short to int int to long long to int byte to int short to int int to long long to int byte to int 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 2.5 0 3 25 2 2.5 0 3 25 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Size of int in Java is Depends on execution environment 32 bit 64 bit 16 bit Depends on execution environment 32 bit 64 bit 16 bit ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables What would be the output of the following fraction of code ?int Integer = 34 ;char String = 'S' ;System.out.print( Integer ) ;System.out.print( String ) ; 34 S Does not compile as Integer and String are API class names. 34 Throws exception. S 34 S Does not compile as Integer and String are API class names. 34 Throws exception. S 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 11 5 None of these 4 12 11 5 ANSWER DOWNLOAD EXAMIANS APP