int *p[10]
p is a pointer to a 10 element integer array
p is a 10-element array of pointers to integer quantity
p is a pointer to an integer quantity
None of the above
int p(char *a)
p is a pointer to pointer to integer
p is a pointer to a function that accepts an argument which is a pointer to a character and returns an integer quantity
p is a function that accepts an argument which is a pointer to a character and returns an integer quantity
p is a function that accepts an argument which is a pointer to a character and returns a pointer to an integer quantity
int (*p)[10]
p is a 10-element array of pointers to an integer
What gets displayed on the screen when the following program is compiled and run. Select the one correct answer. protected class example { public static void main(String args[]) { String test = "abc"; test = test + test; System.out.println(test); } }
The class does not compile because the top level class cannot be protected.
The program prints "abc"
The program prints "abcabc"
The program does not compile because statement "test = test + test" is illegal.
Which of the following are true. Select the three correct answers.
A static method may be invoked before even a single instance of the class is constructed.
A static method cannot access non-static methods of the class.
Abstract modifier can appear before a class or a method but not before a variable.
final modifier can appear before a class or a variable but not before a method.
Synchronized modifier may appear before a method or a variable but not before a class.
What is the result of evaluating the expression 14 ^ 23. Select the one correct answer.
25
37
6
-9
23
Which of the following statements related to Garbage Collection are correct. Select the two correct answers.
It is possible for a program to free memory at a given time.
Garbage Collection feature of Java ensures that the program never runs out of memory.
It is possible for a program to make an object available for Garbage Collection.
The finalize method of an object is invoked before garbage collection is performed on the object.
Which of these are core interfaces in the collection framework. Select the one correct answer.
Tree
Stack
Queue
Array
LinkedList
Map
class MCZ27 { public static void main (String[] args) { char a = '\f'; // 1 char b = '\n'; // 2 char c = '\r'; // 3 char d = '\l'; // 4 char e = '\'; // 5 }} A compile-time error is generated at which line?
1
2
3
4
5
No errors
class JJF3 { public static void main(String args[]) { System.out.print(Integer.toBinaryString(Byte.MAX_VALUE)+","); System.out.print(Integer.toOctalString(Byte.MAX_VALUE)+","); System.out.print(Integer.toString(Byte.MAX_VALUE)+","); System.out.print(Integer.toHexString(Byte.MAX_VALUE)); }}
Prints: 1111111,177,127,7f
Prints: 11111111,377,256,ff
Compile-time error
Run-time error