1z1-808 無料問題集「Oracle Java SE 8 Programmer I」

Given the code fragment:

Which code fragment, when inserted at // insert code here, enables the code to compile and and print a b c?

Given the code fragments:
9. class Student {
10. int rollnumber;
11. String name;
12. List courses = new ArrayList();
13. // insert code fragment here
14. public String toString() {
15. return rollnumber + " : " + name + " : " + courses;
16. }
17. }
And,
public class Test {
public static void main (String[] args) {
List cs = new ArrayList();
cs.add("Java");
cs.add("C");
Student s = new Student(123,"Fred",cs);
System.out.println(s);
}
}
Which code fragment, when inserted at line 13, enables class Test to print 123 : Fred : [Java, C] ?
private Student(int i, String name, List cs) {

解説: (JPNTest メンバーにのみ表示されます)
Given:

Which code fragment, when inserted at line 7, enables the code print true?

Given:

And given the code fragment:

Which two modifications enable the code to print the following output? Canine 60 Long Feline 80 Short

Given:
package pkg1;
class Bb { }
public class Ee {
private Ee() { }
}
package pkg2;
final class Ww;
package pkg3;
public abstract class Dd { void m() { } }
And,
1. package pkg4;
2. import pkg1.*;
3. import pkg2.*;
4. import pkg3.*;
5. // insert a class definition here
Which two class definitions, when inserted independently at line 5, enable the code to compile?

正解:A、C 解答を投票する
Given:

What is the result?

Given the code fragment:

What is the result?

Given:

What is the result?

Given the code fragment from three files:

Which code fragment, when inserted at line 2, enables the code to compile?

解説: (JPNTest メンバーにのみ表示されます)
Given:

Which inserted at line 11, will provide the following output?
[21, 15, 11]

解説: (JPNTest メンバーにのみ表示されます)
Given:

What is the result?

Given the code fragment:

What is the result?

Given the code fragment:

Which two modifications should you make so that the code compiles successfully?

正解:D、E 解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
Given the class definitions:
class C1 {}
class C2 extends C1 {}
class C3 extends C2 {}
and the code fragment:
16. C1 obj1 = (C1) new C2();
17. C2 obj2 = (C2) new C3();
18. C2 obj3 = (C2) new C1();
19. C3 obj4 = (C3) obj2;
Which line throws ClassCastException?

解説: (JPNTest メンバーにのみ表示されます)

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡