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 ) ; }} 22 21 20 Compilation Error Throws Exception TRUE ANSWER : ? YOUR ANSWER : ?
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 0 2 2.5 3 TRUE ANSWER : ? YOUR ANSWER : ?
The smallest integer type is ......... and its size is ......... bits. short, 16 short, 16 byte, 8 short, 8 TRUE ANSWER : ? YOUR ANSWER : ?
Determine output:public class Test { static void test(float x){ System.out.print("float"); } static void test(double x){ System.out.print("double"); } public static void main(String[] args){ test(99.9); }} double Exception is thrown at runtime float Compilation Error TRUE ANSWER : ? YOUR ANSWER : ?
Size of int in Java is 32 bit 64 bit Depends on execution environment 16 bit TRUE ANSWER : ? YOUR ANSWER : ?
Java is a ........... language. None of these strongly typed weakly typed moderate typed TRUE ANSWER : ? YOUR ANSWER : ?
Size of float and double in Java is 64 and 64 32 and 64 64 and 32 32 and 32 TRUE ANSWER : ? YOUR ANSWER : ?
In Java, the word true is ................ Same as value 0 A Java keyword A Boolean literal Same as value 1 TRUE ANSWER : ? YOUR ANSWER : ?
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 Raises an exception Prints 2.5 None of these TRUE ANSWER : ? YOUR ANSWER : ?