多项选择题

Given:

Which three code fragments, inserted independently at line 6, will compile?()

A.list.add("foo");
B.Object o = list;
C.String s = list.get(0);
D.list = new ArrayList();


您可能感兴趣的试卷

你可能感兴趣的试题

1.多项选择题

Given:

Which two, inserted at line 11, will allow the code to compile?()

A.public&ensp;class&ensp;MinMax<;?>;&ensp;{
B.public&ensp;class&ensp;MinMax<;?extends&ensp;Number>;&ensp;{
C.public&ensp;class&ensp;MinMax<;Nextends&ensp;Object>;&ensp;{
D.public&ensp;class&ensp;MinMax<;Nextends&ensp;Number>;&ensp;{
E.public&ensp;class&ensp;MinMax<;?extends&ensp;Object>;&ensp;{
F.public&ensp;class&ensp;MinMax<;Nextends&ensp;Integer>;&ensp;{

2.单项选择题

Given:

What is the result?()

A.0
B.1
C.2
D.3
E.4

3.多项选择题

Given:

Which three are true?()

A.Cat is-a Animal
B.Cat is-a Jumper
C.Dog is-a Animal
D.Dog is-a Jumper
E.Cat has-a Animal
F.Beagle has-a Tail

4.多项选择题

Given:

Which two are true?()

A.The output is mm.
B.The output is mc.
C.Component is-a Meter.
D.Component has-a Meter.
E.DeluxeThingy is-a Component.
F.DeluxeThingy has-a Component.

6.单项选择题

Given:

Which statement is true?()

A.420 is the output.
B.An exception is thrown at runtime.
C.All constructors must be declared public.
D.Constructors CANNOT use the private modifier.
E.Constructors CANNOT use the protected modifier.

8.单项选择题

Given:

What is the result?()

A.b 3
B.b 8
C.b 13
D.f 3

9.单项选择题

Given:

What is the result?()

A.12
B.The code runs with no output.
C.An exception is thrown at runtime.
D.Compilation fails because of an error in line 21.
E.Compilation fails because of an error in line 22.
F.Compilation fails because of an error in line 31.

最新试题

Given a class whose instances, when found in a collection of objects, are sorted by using the compare To method, which two statements are true?()

题型:多项选择题

Given a method that must ensure that its parameter is not null:What, inserted at line 12, is the appropriate way to handle a null value?()

题型:单项选择题

A programmer has an algorithm that requires a java.util.List that provides an efficient implementation of add(0, object), but does NOT need to support quick random access.What supports these requirements?()

题型:单项选择题

Given:Which command-line invocations will compile?()

题型:单项选择题

Given:Which two code fragments, inserted independently at line 5, will compile without warnings?()

题型:多项选择题

Given:What is the result?()

题型:单项选择题

A team of programmers is involved in reviewing a proposed design for a new utility class. After some discussion, they realize that the current design allows other classes to access methods in the utility class that should be accessible only to methods within the utility class itself.What design issue has the team discovered?()

题型:单项选择题

Given:What is the appropriate definition of the hashCode method in class Person?()

题型:单项选择题

Given:What is the result?()

题型:单项选择题

Given:What is the result?()

题型:单项选择题