Determine output:public class Test{int i = 34;public static void main(String args[]){Test t1 = new Test();Test t2 = new Test();t1.i = 65;System.out.print(t1.i);System.out.print(t2.i);}} 65 34 34 65 65 65 34 34 TRUE ANSWER : ? YOUR ANSWER : ?
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. 34 S Throws exception. 34 S 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 None of these Prints 2.5 Raises an exception TRUE ANSWER : ? YOUR ANSWER : ?
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 20 Throws Exception Compilation Error 22 TRUE ANSWER : ? YOUR ANSWER : ?
What will be output of following program?public class Test{ public static void main(String[] args){ byte b=127; b++; b++; System.out.println(b); }} -127 2 129 Compiler error None of these TRUE ANSWER : ? YOUR ANSWER : ?
In Java, the word true is ................ A Boolean literal A Java keyword Same as value 0 Same as value 1 TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following automatic type conversion will be possible? int to long long to int short to int byte to int TRUE ANSWER : ? YOUR ANSWER : ?
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 11 4 12 5 TRUE ANSWER : ? YOUR ANSWER : ?
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 TRUE ANSWER : ? YOUR ANSWER : ?