Data Types and Variables The following fraction of codedouble STATIC = 2.5 ;System.out.println( STATIC ); Raises an exception Rraises an error as STATIC is used as a variable which is a keyword Prints 2.5 None of these Raises an exception Rraises an error as STATIC is used as a variable which is a keyword Prints 2.5 None of these ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables Java is a ........... language. strongly typed weakly typed moderate typed None of these strongly typed weakly typed moderate typed None of these 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);} } 50 None of these Compilation Error 10 50 None of these Compilation Error 10 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); }} Error 10 20 10 10 10 20 10 100 10 20 10 20 Error 10 20 10 10 10 20 10 100 10 20 10 20 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); }} 0 2.5 2 3 25 0 2.5 2 3 25 ANSWER DOWNLOAD EXAMIANS APP
Data Types and Variables The smallest integer type is ......... and its size is ......... bits. short, 8 byte, 8 short, 16 short, 16 short, 8 byte, 8 short, 16 short, 16 ANSWER DOWNLOAD EXAMIANS APP