최신Oracle Java SE 7 Programmer I - 1Z1-803무료샘플문제
문제1
Given the code fragment:

What is the result?
Given the code fragment:

What is the result?
정답: D
문제2
Given:
abstract class A1 { public abstract void m1(); public void m2() { System.out.println("Green"); }
}
abstract class A2 extends A1 { public abstract void m3(); public void m1() { System.out.println("Cyan"); } public void m2() { System.out.println("Blue"); }
}
public class A3 extends A2 { public void m1() { System.out.println("Yellow"); }
public void m2() { System.out.println("Pink"); }
public void m3() { System.out.println("Red"); }
public static void main(String[] args) {
A2 tp = new A3();
tp.m1();
tp.m2();
tp.m3();
}
}
What is the result?
Given:
abstract class A1 { public abstract void m1(); public void m2() { System.out.println("Green"); }
}
abstract class A2 extends A1 { public abstract void m3(); public void m1() { System.out.println("Cyan"); } public void m2() { System.out.println("Blue"); }
}
public class A3 extends A2 { public void m1() { System.out.println("Yellow"); }
public void m2() { System.out.println("Pink"); }
public void m3() { System.out.println("Red"); }
public static void main(String[] args) {
A2 tp = new A3();
tp.m1();
tp.m2();
tp.m3();
}
}
What is the result?
정답: B
설명: (ExamPassdump 회원만 볼 수 있음)
문제3
Which three are valid types for switch?
Which three are valid types for switch?
정답: A,D,E
설명: (ExamPassdump 회원만 볼 수 있음)
문제4
Given: Which three lines will compile and output "right on!"?

Given: Which three lines will compile and output "right on!"?

정답: B,C,D
문제5
Given: What is the result?

Given: What is the result?

정답: E
문제6
Given:
Class A { }
Class B { }
Interface X { } Interface Y { }
Which two definitions of class C are valid?
Given:
Class A { }
Class B { }
Interface X { } Interface Y { }
Which two definitions of class C are valid?
정답: C,D
설명: (ExamPassdump 회원만 볼 수 있음)
문제7
Given:
class Sports {
int num_players;
String name, ground_condition;
Sports(int np, String sname, String sground){ num_players = np;
name = sname;
ground_condition = sground;
}
}
class Cricket extends Sports {
int num_umpires;
int num_substitutes;
Which code fragment can be inserted at line //insert code here to enable the code to compile?
Given:
class Sports {
int num_players;
String name, ground_condition;
Sports(int np, String sname, String sground){ num_players = np;
name = sname;
ground_condition = sground;
}
}
class Cricket extends Sports {
int num_umpires;
int num_substitutes;
Which code fragment can be inserted at line //insert code here to enable the code to compile?
정답: D
설명: (ExamPassdump 회원만 볼 수 있음)
문제8
Given:
public class Test {
public static void main(String[] args) {
try {
String[] arr =new String[4];
arr[1] = "Unix";
arr[2] = "Linux";
arr[3] = "Solarios";
for (String var : arr) {
System.out.print(var + " ");
}
} catch(Exception e) {
System.out.print (e.getClass());
}
}
}
What is the result?
Given:
public class Test {
public static void main(String[] args) {
try {
String[] arr =new String[4];
arr[1] = "Unix";
arr[2] = "Linux";
arr[3] = "Solarios";
for (String var : arr) {
System.out.print(var + " ");
}
} catch(Exception e) {
System.out.print (e.getClass());
}
}
}
What is the result?
정답: A
설명: (ExamPassdump 회원만 볼 수 있음)
문제9
Which statement will empty the contents of a StringBuilder variable named sb?
Which statement will empty the contents of a StringBuilder variable named sb?
정답: C
문제10
Given:

What will be the output?

Given:

What will be the output?

정답: B
문제11
Given:

What is the result?
Given:

What is the result?
정답: A