최신Oracle Java Standard Edition 6 Programmer Certified Professional - 1Z0-851무료샘플문제

문제1
Given:
1.public class Breaker2 {
2.static String o = "";
3.public static void main(String[] args) {
4.z:
5.for(int x = 2; x < 7; x++) {
6.if(x==3) continue;
7.if(x==5) break z;
8.o = o + x;
9.}
10.System.out.println(o);
11.}
12.}
What is the result?

정답: B
문제2
Given a pre-generics implementation of a method:
11.public static int sum(List list) {
12.int sum = 0;
13.for ( Iterator iter = list.iterator(); iter.hasNext(); ) {
14.int i = ((Integer)iter.next()).intValue();
15.sum += i;
16.}
17.return sum;
18.}
What three changes allow the class to be used with generics and avoid an unchecked warning? (Choose three.)

정답: A,C,D
문제3
Given:
22.StringBuilder sb1 = new StringBuilder("123");
23.String s1 = "123";
24.// insert code here
25.System.out.println(sb1 + " " + s1);
Which code fragment, inserted at line 24, outputs "123abc 123abc"?

정답: E
문제4
Given a class Repetition:
1.package utils;
2.3.
public class Repetition {
4.public static String twice(String s) { return s + s; }
5.} and given another class Demo: 1. // insert code here
2.3.
public class Demo {
4.public static void main(String[] args) {
5.System.out.println(twice("pizza"));
6.}
7.}
Which code should be inserted at line 1 of Demo.java to compile and run Demo to print "pizzapizza"?

정답: F
문제5
Given:
12.import java.util.*;
13.public class Explorer1 {
14.public static void main(String[] args) {
15.TreeSet<Integer> s = new TreeSet<Integer>();
16.TreeSet<Integer> subs = new TreeSet<Integer>();
17.for(int i = 606; i < 613; i++)
18.if(i%2 == 0) s.add(i);
19.subs = (TreeSet)s.subSet(608, true, 611, true);
20.s.add(609);
21.System.out.println(s + " " + subs);
22.}
23.}
What is the result?

정답: F
문제6
Given:
1.public class BuildStuff {
2.public static void main(String[] args) {
3.Boolean test = new Boolean(true);
4.Integer x = 343;
5.Integer y = new BuildStuff().go(test, x);
6.System.out.println(y);
7.}
8.int go(Boolean b, int i) {
9.if(b) return (i/7);
10.return (i/49);
11.}
12.}
What is the result?

정답: D
문제7
Given:
1.class Alligator {
2.public static void main(String[] args) {
3.int []x[] = {{1,2}, {3,4,5}, {6,7,8,9}};
4.int [][]y = x;
5.System.out.println(y[2][1]);
6.}
7.}
What is the result?

정답: E
문제8
Given:
5.class Building { }
6.public class Barn extends Building {
7.public static void main(String[] args) {
8.Building build1 = new Building();
9.Barn barn1 = new Barn();
10.Barn barn2 = (Barn) build1;
11.Object obj1 = (Object) build1;
12.String str1 = (String) build1;
13.Building build2 = (Building) barn1;
14.}
15.}
Which is true?

정답: B
문제9
Given:
11.public static Iterator reverse(List list) {
12.Collections.reverse(list);
13.return list.iterator();
14.}
15.public static void main(String[] args) {
16.List list = new ArrayList();
17.list.add("1"); list.add("2"); list.add("3");
18.for (Object obj: reverse(list))
19.System.out.print(obj + ", ");
20.}
What is the result?

정답: B
문제10
Given:
11.String test = "Test A. Test B. Test C.";
12.// insert code here
13.String[] result = test.split(regex);
Which regular expression, inserted at line 12, correctly splits test into "Test A", "Test B", and "Test C"?

정답: D
문제11
Given:
11.public void testIfA() {
12.if (testIfB("True")) {
13.System.out.println("True");
14.} else {
15.System.out.println("Not true");
16.}
17.}
18.public Boolean testIfB(String str) {
19.return Boolean.valueOf(str);
20.}
What is the result when method testIfA is invoked?

정답: E
문제12
Click the Exhibit button. What is the output of the program shown in the exhibit?

정답: B
문제13
Which two code fragments are most likely to cause a StackOverflowError? (Choose two.)

정답: A,D
문제14
Given:
3.import java.util.*;
4.public class G1 {
5.public void takeList(List<? extends String> list) {
6.// insert code here
7.}
8.}
Which three code fragments, inserted independently at line 6, will compile? (Choose three.)

정답: B,C,E
문제15
Which two code fragments will execute the method doStuff() in a separate thread? (Choose two.)

정답: C,D
문제16
Given:
11.public static void main(String[] args) {
12.Integer i = new Integer(1) + new Integer(2);
13.switch(i) {
14.case 3: System.out.println("three"); break;
15.default: System.out.println("other"); break;
16.}
17.}
What is the result?

정답: E

KoreaDumps의 제품으로 GO GO GO !

자격증의 중요성:

경쟁율이 심한 IT시대에 인증시험을 패스함으로 IT업계 관련 직종에 종사하고자 하는 분들에게는 아주 큰 가산점이 될수 있고 자신만의 위치를 보장할수 있으며 더욱이는 한층 업된 삶을 누릴수 있을수도 있습니다.

KoreaDumps 제품의 가치:

KoreaDumps에는 IT인증시험의 최신 학습가이드가 있습니다. KoreaDumps의 IT전문가들이 자신만의 경험과 끊임없는 노력으로 최고의 학습자료를 작성해 여러분들이 시험에서 패스하도록 도와드립니다.

무료샘플 받아보기:

관심있는 인증시험과목 덤프의 무료샘플을 원하신다면 덤프구매사이트의 PDF Version Demo 버튼을 클릭하고 메일주소를 입력하시면 바로 다운받아 덤프의 일부분 문제를 체험해 보실수 있습니다.

완벽한 서비스 제공:

KoreaDumps는 한국어로 온라인상담과 메일상담을 받습니다. 덤프구매후 일년동안 무료 업데이트 서비스를 제공해드리며 구매일로 부터 60일내에 시험에서 떨어지는 경우 덤프비용 전액을 환불해드려 고객님의 부담을 덜어드립니다.