Questions
Question 1 Multiple Choice (Single Answer)
Overriding and Overloading is for ?
- Methods and variables
- class
- variables
- Methods
Question 2 Multiple Choice (Single Answer)
Which one of these lists contains only Java programming language keywords?
- class, if, void, long, Int, continue
- goto, instanceof, native, finally, default, throws
- try, virtual, throw, final, volatile, transient
- strictfp, constant, super, implements, do
Question 3 Multiple Choice (Single Answer)
Which will legally declare, construct, and initialize an array?
- int [] myList = {"1", "2", "3"};
- int [] myList = (5, 8, 2);
- int myList [] [] = {4,9,7,0};
- int myList [] = {4, 3, 7};
Question 4 Multiple Choice (Single Answer)
Which is a reserved word in the Java programming language?
- method
- native
- subclasses
- reference
Question 5 Multiple Choice (Single Answer)
Which is a valid keyword in java?
- interface
- string
- Float
- unsigned
Question 6 Multiple Choice (Single Answer)
Which one of the following will declare an array and initialize it with five numbers?
- Array a = new Array(5);
- int [] a = {23,22,21,20,19};
- int a [] = new int[5];
- int [5] array;
Question 7 Multiple Choice (Single Answer)
Which is the valid declarations within an interface definition?
- public double methoda();
- public final double methoda();
- static void methoda(double d1);
- protected void methoda(double d1);
Question 8 Multiple Choice (Single Answer)
Which one is a valid declaration of a boolean?
- boolean b1 = 0;
- boolean b2 = 'false';
- boolean b3 = false;
- boolean b4 = Boolean.false();
Question 9 Multiple Choice (Single Answer)
Which is a valid declarations of a String?
- String s1 = null;
- String s2 = 'null';
- String s3 = (String) 'abc';
- String s4 = (String) '\ufeed';
Question 10 Multiple Choice (Single Answer)
What is the numerical range of a char?
- -128 to 127
- -(215) to (215) - 1
- 0 to 32767
- 0 to 65535