Oracle Java SE 7 Programmer I (1Z1-803日本語版) - 1Z1-803日本語무료 덤프문제 풀어보기

정답: B,C
설명: (Fast2test 회원만 볼 수 있음)

public class String1 {
public static void main(String[] args) {
String s = "123";
if (s.length() >2)
s.concat("456");
for(int x = 0; x <3; x++)
s += "x";
System.out.println(s);
} }

정답: E
Given:
class MarksOutOfBoundsException extends IndexOutOfBoundsException { }
public class GradingProcess {
void verify(int marks) throws IndexOutOfBoundsException {
if (marks > 100) {
throw new MarksOutOfBoundsException();
}
if (marks > 50) {
System.out.print("Pass");
} else {
System.out.print("Fail");
}
}
public static void main(String[] args) {
int marks = Integer.parseInt(args[2]);
try {
new GradingProcess().verify(marks));
} catch(Exception e) {
System.out.print(e.getClass());
}
}
}

Java grading process 89 50 104

class MarksOutOfBoundsException extends IndexOutOfBoundsException { }
public class GradingProcess {
void verify(int marks) throws IndexOutOfBoundsException {
if (marks > 100) {
throw new MarksOutOfBoundsException();
}
if (marks > 50) {
System.out.print("Pass");
} else {
System.out.print("Fail");
}
}
public static void main(String[] args) {
int marks = Integer.parseInt(args[2]);
try {
new GradingProcess().verify(marks));
} catch(Exception e) {
System.out.print(e.getClass());
}
}
}

Java grading process 89 50 104

정답: E

interface SampleClosable {
public void close () throws java.io.IOException;
}



정답: A,B,D

String h1 = "Bob";
String h2 = new String ("Bob");

정답: D



정답: B



Javac Traveler.java
Java Traveler Java Duke

정답: C





정답: A
Given:
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 {
}

정답: C
Given:
interface Pet { }
class Dog implements Pet { }
public class Beagle extends Dog{ }

interface Pet { }
class Dog implements Pet { }
public class Beagle extends Dog{ }

정답: A,D,E
Given:




정답: A