Oracle Java Standard Edition 6 Programmer Certified Professional - 1Z0-851무료 덤프문제 풀어보기

Given:
1.public class Target {
2.private int i = 0;
3.public int addOne(){
4.return ++i;
5.}
6.} And:
1.public class Client {
2.public static void main(String[] args){
3.System.out.println(new Target().addOne());
4.}
5.}
Which change can you make to Target without affecting Client?

정답: C
Given:
11.static class A {
12.void process() throws Exception { throw new Exception(); }
13.}
14.static class B extends A {
15.void process() { System.out.println("B"); }
16.}
17.public static void main(String[] args) {
18.new B().process();
19.}
What is the result?

정답: C
Given:
1.interface TestA { String toString(); }
2.public class Test {
3.public static void main(String[] args) {
4.System.out.println(new TestA() {
5.public String toString() { return "test"; }
6.});
7.}
8.}
What is the result?

정답: A
Click the Exhibit button. Which three code fragments, added individually at line 29, produce the output 100? (Choose three.)

정답: A,C,F
Given:
11.public class Commander {
12.public static void main(String[] args) {
13.String myProp = /* insert code here */
14.System.out.println(myProp);
15.}
16.}
and the command line:
java -Dprop.custom=gobstopper Commander Which two, placed on line 13, will produce the
output gobstopper? (Choose two.)

정답: A,D
Given:
1.public class Boxer1{
2.Integer i;
3.int x;
4.public Boxer1(int y) {
5.x = i+y;
6.System.out.println(x);
7.}
8.public static void main(String[] args) {
9.new Boxer1(new Integer(4));
10.}
11.}
What is the result?

정답: B
DRAG DROP
Click the Task button.
정답:
Given:
11.interface DeclareStuff {
12.public static final int EASY = 3;
13.void doStuff(int t); }
14.public class TestDeclare implements DeclareStuff {
15.public static void main(String [] args) {
16.int x = 5;
17.new TestDeclare().doStuff(++x);
18.}
19.void doStuff(int s) {
20.s += EASY + ++s;
21.System.out.println("s " + s);
22.}
23.}
What is the result?

정답: D
Given:
10.public class Foo {
11.static int[] a;
12.static { a[0]=2; }
13.public static void main( String[] args ) {}
14.}
Which exception or error will be thrown when a programmer attempts to run this code?

정답: C
Given:
22.public void go() {
23.String o = "";
24.z:
25.for(int x = 0; x < 3; x++) {
26.for(int y = 0; y < 2; y++) {
27.if(x==1) break;
28.if(x==2 && y==1) break z;
29.o = o + x + y;
30.}
31.}
32.System.out.println(o);
33.}
What is the result when the go() method is invoked?

정답: D
Given:
1.public class Plant {
2.private String name;
3.public Plant(String name) { this.name = name; }
4.public String getName() { return name; }
5.}
1.public class Tree extends Plant {
2.public void growFruit() { }
3.public void dropLeaves() { }
4.}
Which statement is true?

정답: C

우리와 연락하기

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

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

서포트: 바로 연락하기 

English Deutsch 繁体中文 日本語