Which two statements are true for a two-dimensional array of primitive data type?
A.
It cannot contain elements of different types.
B.
The length of each dimension must be the same.
C.
At the declaration time, the number of elements of the array in each dimension must be
specified.
D.
All methods of the class object may be invoked on the two-dimensional array.
At the declaration time, the number of elements of the array in each dimension must be
specified.
All methods of the class object may be invoked on the two-dimensional array.
http://stackoverflow.com/questions/12806739/is-an-array-a-primitive-type-oran-
object-or-something-else-entirely
Given the code fragment:
Which two modifications should you make so that the code compiles successfully?
A.
Option A
B.
Option B
C.
Option C
D.
Option D
E.
Option E
Option A
Option C
Add throws clause in both printFileContent and main
A.
Option A
B.
Option B
C.
Option C
D.
Option D
E.
Option E
Option A
Option C
Given:
public class MainMethod {
void main() {
System.out.println("one");
}
static void main(String args) {
System.out.println("two");
}
public static void main(String[] args) {
System.out.println("three");
}
void mina(Object[] args) {
System.out.println("four");
}
}
What is printed out when the program is excuted?
A.
one
B.
two
C.
three
D.
four
three
A.
Option A
B.
Option B
C.
Option C
D.
Option D
E.
Option E
Option C
Page 2 out of 48 Pages |
Previous |