1.Which four options describe the correct default values for array elements of the types indicated?
int -> 0
String -> "null"
Dog -> null
char -> '\u0000'
1, 2, 3, 4
1, 3, 4, 5
2, 4, 5, 6
3, 4, 5, 6
2.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
3.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};
4.Which is a reserved word in the Java programming language?
method
native
subclasses
reference
5.Which is a valid keyword in java?
interface
string
Float
unsigned
No comments:
Post a Comment