최신 1Z1-803 무료덤프 - Oracle Java SE 7 Programmer I

Given:
class Overloading {
int x(double d) {
System.out.println("one");
return 0;
}
String x(double d) {
System.out.println("two");
return null;
}
double x(double d) {
System.out.println("three");
return 0.0;
}
public static void main(String[] args) {
new Overloading().x(4.0);
}
}
What is the result?

정답: B
Given:
public class ComputeSum {
public int x;
public int y;
public int sum;
public ComputeSum (int nx, int ny) {
x = nx; y =ny;
updateSum();
}
public void setX(int nx) { x = nx; updateSum();}
public void setY(int ny) { x = ny; updateSum();}
void updateSum() { sum = x + y;}
}
This class needs to protect an invariant on the sum field.
Which three members must have the private access modifier to ensure that this invariant is maintained?

정답: A,B,C
설명: (DumpTOP 회원만 볼 수 있음)
Given the code fragment:
public class Test {
public static void main(String[] args) {
boolean isChecked = false;
int arry[] = {1,3,5,7,8,9};
int index = arry.length;
while ( <code1> ) {
if (arry[index-1] % 2 ==0) {
isChecked = true;
}
<code2>
}
System.out.print(arry(index]+", "+isChecked));
} } Which set of changes enable the code to print 1, true?

정답: C
설명: (DumpTOP 회원만 볼 수 있음)
Given:
package p1;
public interface DoInterface { void method1(int n1); // line n1
}
package p3;
import p1.DoInterface;
public class DoClass implements DoInterface { public DoClass(int p1) { } public void method1(int p1) { } // line n2 private void method2(int p1) { } // line n3
}
public class Test {
public static void main(String[] args) {
DoInterface doi= new DoClass(100); // line n4
doi.method1(100);
doi.method2(100);
}
}
Which change will enable the code to compile?

정답: C
설명: (DumpTOP 회원만 볼 수 있음)
int i, j=0; i = (3* 2 +4 +5 ) ; j = (3 * ((2+4) + 5)); System.out.println("i:"+ i + "\nj":+j);
What is the result?

정답: C
Given: What is the result?

정답: C
Which three statements are true about the structure of a Java class?

정답: D,E,F
설명: (DumpTOP 회원만 볼 수 있음)
Given the code in a file Traveler.java:

And the commands:
Javac Traveler.java
Java Traveler Java Duke
What is the result?

정답: B
Which two are valid array declaration?

정답: A,D
Given: What is the result?

정답: D
Given:
public class TestLoop {
public static void main(String[] args) {
int array[] = {0, 1, 2, 3, 4};
int key = 3;
for (int pos = 0; pos < array.length; ++pos) {
if (array[pos] == key) {
break;
}
}
System.out.print("Found " + key + "at " + pos);
} }
What is the result?

정답: D
설명: (DumpTOP 회원만 볼 수 있음)
Given: What is the result?

정답: C
Which statement is true about the default constructor of a top-level class?

정답: B
설명: (DumpTOP 회원만 볼 수 있음)
Given:

What is the result?

정답: D

우리와 연락하기

문의할 점이 있으시면 메일을 보내오세요. 12시간이내에 답장드리도록 하고 있습니다.

근무시간: ( UTC+9 ) 9:00-24:00
월요일~토요일

서포트: 바로 연락하기