Oracle 1z0-808日本語 Actual Free Exam Questions & Community Discussion
与えられる:
public class SampleClass {
public static void main(String[] args) {
AnotherSampleClass asc = new AnotherSampleClass(); SampleClass sc = new SampleClass(); sc = asc; System.out.println("sc: " + sc.getClass()); System.out.println("asc: " + asc.getClass());
}}
class AnotherSampleClass extends SampleClass {
}
結果は何ですか?
public class SampleClass {
public static void main(String[] args) {
AnotherSampleClass asc = new AnotherSampleClass(); SampleClass sc = new SampleClass(); sc = asc; System.out.println("sc: " + sc.getClass()); System.out.println("asc: " + asc.getClass());
}}
class AnotherSampleClass extends SampleClass {
}
結果は何ですか?
Correct Answer: C
Vote an answer
次が与えられます:

次のコード・フラグメントがあります:
Book book1 = new EBook ();
Book1.readBook();
どのオプションはコードをコンパイルすることができますか。


次のコード・フラグメントがあります:
Book book1 = new EBook ();
Book1.readBook();
どのオプションはコードをコンパイルすることができますか。

Correct Answer: C
Vote an answer
コードの断片を考えると、次のようになります。
リストの色 = new ArrayList();
color.add("緑");
color.add("赤");
color.add("青");
color.add("黄色");
color.remove(2);
color.add(3,"シアン");
System.out.print(色);
結果は何ですか?
リストの色 = new ArrayList();
color.add("緑");
color.add("赤");
color.add("青");
color.add("黄色");
color.remove(2);
color.add(3,"シアン");
System.out.print(色);
結果は何ですか?
Correct Answer: D
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
次のグリッドは 2D 配列の状態を示しています。

このグリッドは次のコードで作成されます。

//line n1 の代わりに挿入されるコード行は、グリッドに X を追加して、グリッドに 3 つの連続する X が含まれるようにしますか?

このグリッドは次のコードで作成されます。

//line n1 の代わりに挿入されるコード行は、グリッドに X を追加して、グリッドに 3 つの連続する X が含まれるようにしますか?
Correct Answer: E
Vote an answer
次のコード・フラグメントがあります:

結果は何ですか。

結果は何ですか。
Correct Answer: D
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
与えられる:

結果は何ですか?

結果は何ですか?
Correct Answer: D
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
与えられる:
パブリック クラス 絵画 {
プライベート文字列型。
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public static void main(String[] args) {
Painting obj1 = new Painting();
Painting obj2 = new Painting();
obj1.setType(null);
obj2.setType("Fresco");
System.out.print(obj1.getType() + " : " + obj2.getType());
}
}
結果は何ですか?
パブリック クラス 絵画 {
プライベート文字列型。
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public static void main(String[] args) {
Painting obj1 = new Painting();
Painting obj2 = new Painting();
obj1.setType(null);
obj2.setType("Fresco");
System.out.print(obj1.getType() + " : " + obj2.getType());
}
}
結果は何ですか?
Correct Answer: A
Vote an answer
コードの断片を考えると、次のようになります。
public class ForTest {
public static void main(String[] args) {
int[] array = {1, 2, 3};
for ( foo ) {
}
}
foo を個別に置き換えると、プログラムのコンパイルが可能になる 3 つのコード フラグメントはどれですか?
public class ForTest {
public static void main(String[] args) {
int[] array = {1, 2, 3};
for ( foo ) {
}
}
foo を個別に置き換えると、プログラムのコンパイルが可能になる 3 つのコード フラグメントはどれですか?
Correct Answer: A,B,C
Vote an answer
main()メソッドについて正しい説明はどれですか。
Correct Answer: D
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
コードの断片を考えると、次のようになります。
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);
}
}
13 行目に挿入すると、クラス Test が 123 : Fred : [Java, C] を出力できるようにするコード フラグメントはどれですか?
private Student(int i, 文字列名, リスト cs) {
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);
}
}
13 行目に挿入すると、クラス Test が 123 : Fred : [Java, C] を出力できるようにするコード フラグメントはどれですか?
private Student(int i, 文字列名, リスト cs) {
Correct Answer: D
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
0
0
0
10

