Java Programming :: Language Fundamentals
-
Which four options describe the correct default values for array elements of the types indicated?
- int -> 0
- String -> "null"
- Dog -> null
- char -> '\u0000'
- float -> 0.0f
- boolean -> true
-
Which one of these lists contains only Java programming language keywords?
-
Which will legally declare, construct, and initialize an array?
-
Which is a reserved word in the Java programming language?
-
Which three are legal array declarations?
- int [] myScores [];
- char [] myChars;
- int [6] myScores;
- Dog myDogs [];
- Dog myDogs [7];
-
Which three piece of codes are equivalent to line 3?public interface Foo { int k = 4; /* Line 3 */ }
- final int k = 4;
- public int k = 4;
- static int k = 4;
- abstract int k = 4;
- volatile int k = 4;
- protected int k = 4;
-
Which one of the following will declare an array and initialize it with five numbers?
-
Which three are valid declarations of a char?
- char c1 = 064770;
- char c2 = 'face';
- char c3 = 0xbeef;
- char c4 = \u0022;
- char c5 = '\iface';
- char c6 = '\uface';
-
Which is the valid declarations within an interface definition?