최신Oracle Java SE 8 Programmer I - 1z1-808무료샘플문제
문제1
Given the code fragment:

What is the result?
Given the code fragment:

What is the result?
정답: D
문제2
Which code fragment cause a compilation error?
float flt = 100F;
Which code fragment cause a compilation error?
float flt = 100F;
정답: C
설명: (KoreaDumps 회원만 볼 수 있음)
문제3
Given the code fragment:

What is the result?
Given the code fragment:

What is the result?
정답: A
설명: (KoreaDumps 회원만 볼 수 있음)
문제4
Given:
class Base {
public static void main(String[] args) {
System.out.println("Base " + args[2]);
}
}
public class Sub extends Base{
public static void main(String[] args) {
System.out.println("Overriden " + args[1]);
}
}
And the commands:
javac Sub.java
java Sub 10 20 30
What is the result?
Given:
class Base {
public static void main(String[] args) {
System.out.println("Base " + args[2]);
}
}
public class Sub extends Base{
public static void main(String[] args) {
System.out.println("Overriden " + args[1]);
}
}
And the commands:
javac Sub.java
java Sub 10 20 30
What is the result?
정답: A
문제5
Given:

What is the result?
Given:

What is the result?
정답: A
설명: (KoreaDumps 회원만 볼 수 있음)
문제6
Given the code fragment:
System.out.println(2 + 4 * 9 - 3); //Line 21
System.out.println((2 + 4) * 9 - 3); // Line 22
System.out.println(2 + (4 * 9) - 3); // Line 23
System.out.println(2 + 4 * (9 - 3)); // Line 24
System.out.println((2 + 4 * 9) - 3); // Line 25
Which line of codes prints the highest number?
Given the code fragment:
System.out.println(2 + 4 * 9 - 3); //Line 21
System.out.println((2 + 4) * 9 - 3); // Line 22
System.out.println(2 + (4 * 9) - 3); // Line 23
System.out.println(2 + 4 * (9 - 3)); // Line 24
System.out.println((2 + 4 * 9) - 3); // Line 25
Which line of codes prints the highest number?
정답: D
문제7
View the Exhibit.
public class Hat {
public int ID =0;
public String name = "hat";
public String size = "One Size Fit All";
public String color="";
public String getName() { return name; }
public void setName(String name) {
this.name = name;
}
}
Given:
public class TestHat {
public static void main(String[] args) {
Hat blackCowboyHat = new Hat();
}
}
Which statement sets the name of the Hat instance?
View the Exhibit.
public class Hat {
public int ID =0;
public String name = "hat";
public String size = "One Size Fit All";
public String color="";
public String getName() { return name; }
public void setName(String name) {
this.name = name;
}
}
Given:
public class TestHat {
public static void main(String[] args) {
Hat blackCowboyHat = new Hat();
}
}
Which statement sets the name of the Hat instance?
정답: C
문제8
What is the result?
Class StaticField {
static int i = 7;
public static void main(String[] args) {
StaticFied obj = new StaticField();
obj.i++;
StaticField.i++;
obj.i++;
System.out.println(StaticField.i + " "+ obj.i);
}
}
What is the result?
Class StaticField {
static int i = 7;
public static void main(String[] args) {
StaticFied obj = new StaticField();
obj.i++;
StaticField.i++;
obj.i++;
System.out.println(StaticField.i + " "+ obj.i);
}
}
정답: D
문제9
Given the code fragment:

Which modification enables the code fragment to print TrueDone?
Given the code fragment:

Which modification enables the code fragment to print TrueDone?
정답: C
설명: (KoreaDumps 회원만 볼 수 있음)
문제10
Given:

What is the result?
Given:

What is the result?
정답: C
설명: (KoreaDumps 회원만 볼 수 있음)
문제11
Given the code fragment:

What is the result?
Given the code fragment:

What is the result?
정답: B
설명: (KoreaDumps 회원만 볼 수 있음)
문제12
Given:
public class Test {
static boolean bVar;
public static void main(String[] args) {
boolean bVar1 = true;
int count =8;
do {
System.out.println("Hello Java! " +count);
if (count >= 7) {
bVar1 = false;
}
} while (bVar != bVar1 && count > 4);
count -= 2;
}
}
What is the result?
Given:
public class Test {
static boolean bVar;
public static void main(String[] args) {
boolean bVar1 = true;
int count =8;
do {
System.out.println("Hello Java! " +count);
if (count >= 7) {
bVar1 = false;
}
} while (bVar != bVar1 && count > 4);
count -= 2;
}
}
What is the result?
정답: D
설명: (KoreaDumps 회원만 볼 수 있음)