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 5 12 4 TRUE ANSWER : ? YOUR ANSWER : ?
Size of float and double in Java is 32 and 32 64 and 32 64 and 64 32 and 64 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); }} 3 2.5 0 25 2 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output for the below code ?1. public class Test{2. int i=8;3. int j=9;4. public static void main(String[] args){5. add();6. }7. public static void add(){8. int k = i+j;9. System.out.println(k);10. }11. } None of these 17 0 Compilation fails with an error at line 8 Compilation fails with an error at line 5 TRUE ANSWER : ? YOUR ANSWER : ?
Size of int in Java is 64 bit Depends on execution environment 32 bit 16 bit TRUE ANSWER : ? YOUR ANSWER : ?
The following fraction of codedouble STATIC = 2.5 ;System.out.println( STATIC ); None of these Prints 2.5 Rraises an error as STATIC is used as a variable which is a keyword Raises an exception TRUE ANSWER : ? YOUR ANSWER : ?
What is the output for the below code?public class Test{ int _$; int $7; int do; public static void main(String argv[]){ Test test = new Test(); test.$7=7; test.do=9; System.out.println(test.$7); System.out.println(test.do); System.out.println(test._$); }} 7 9 0 None of these 7 0 0 Compile error - do is not valid identifier. Compile error - $7 is not valid identifier. TRUE ANSWER : ? YOUR ANSWER : ?
Automatic type conversion in Java takes place when All of these Two type are compatible and size of destination type is equal of source type. Two type are compatible and size of destination type is shorter than source type. Two type are compatible and size of destination type is larger than source type. TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following automatic type conversion will be possible? long to int int to long short to int byte to int TRUE ANSWER : ? YOUR ANSWER : ?
In Java, the word true is ................ A Boolean literal Same as value 1 A Java keyword Same as value 0 TRUE ANSWER : ? YOUR ANSWER : ?