Data Types and Variables In Java byte, short, int and long all of these are unsigned Both of the above signed None of these unsigned Both of the above signed None of these 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); }} 25 2 3 2.5 0 25 2 3 2.5 0 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 22 Compilation Error 20 Throws Exception 21 22 Compilation Error 20 Throws Exception 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 ) ; Does not compile as Integer and String are API class names. Throws exception. 34 S 34 S Does not compile as Integer and String are API class names. Throws exception. 34 S 34 S ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Determine output:class A{ public static void main(String args[]){ int x; x = 10; if(x == 10){ int y = 20; System.out.print("x and y: "+ x + " " + y); y = x*2; } y = 100; System.out.print("x and y: " + x + " " + y); }} 10 20 10 20 10 20 10 10 10 20 10 100 Error 10 20 10 20 10 20 10 10 10 20 10 100 Error ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The following fraction of codedouble STATIC = 2.5 ;System.out.println( STATIC ); Rraises an error as STATIC is used as a variable which is a keyword Prints 2.5 Raises an exception None of these Rraises an error as STATIC is used as a variable which is a keyword Prints 2.5 Raises an exception None of these ANSWER DOWNLOAD EXAMIANS APP