The smallest integer type is ......... and its size is ......... bits. short, 8 short, 16 short, 16 byte, 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); }} float double Compilation Error Exception is thrown at runtime TRUE ANSWER : ? YOUR ANSWER : ?
Size of int in Java is 64 bit 16 bit Depends on execution environment 32 bit 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 22 Throws Exception 20 Compilation Error TRUE ANSWER : ? YOUR ANSWER : ?
Size of float and double in Java is 32 and 64 64 and 64 32 and 32 64 and 32 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 25 0 2 TRUE ANSWER : ? YOUR ANSWER : ?
In Java byte, short, int and long all of these are signed None of these Both of the above unsigned 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. } 0 Compilation fails with an error at line 8 17 Compilation fails with an error at line 5 None of these 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); }} None of these Compiler error -127 129 2 TRUE ANSWER : ? YOUR ANSWER : ?
In Java, the word true is ................ A Java keyword Same as value 1 Same as value 0 A Boolean literal TRUE ANSWER : ? YOUR ANSWER : ?