IT인증,IT자격증,IT자격증시험,IT인증시험

http://www.pass4test.net/

Oracle 1Z0-851인증덤프공부

Oracle 1Z0-851 (Java Standard Edition 6 Programmer Certified Professional Exam) 시험이 너무 어려워 보여서 오르지못할 산처럼 보이시나요? 그건 Pass4Test의 Oracle 1Z0-851 (Java Standard Edition 6 Programmer Certified Professional Exam) 시험문제에 대비하여 제작한  Oracle 1Z0-851 (Java Standard Edition 6 Programmer Certified Professional Exam) 덤프가 있다는 것을 모르고 있기때문입니다.Oracle 1Z0-851 (Java Standard Edition 6 Programmer Certified Professional Exam) 시험에 도전하고 싶으시다면 최강 시험패스율로 유명한 Pass4Test의 Oracle 1Z0-851 (Java Standard Edition 6 Programmer Certified Professional Exam) 덤프로 시험공부를 해보세요.시간절약은 물론이고 가격도 착해서 간단한 시험패스에 딱 좋은 선택입니다.

 

NO.1 Given:

13. public class Pass {

14. public static void main(String [] args) {

15. int x = 5;

16. Pass p = new Pass();

17. p.doStuff(x);

18. System.out.print(" main x = " + x);

19. }

20.

21. void doStuff(int x) {

22. System.out.print(" doStuff x = " + x++);

23. }

24.

}

What is the result?A. Compilation fails.

B. An exception is thrown at runtime.

C. doStuff x = 6 main x =

6

D. doStuff x = 5 main x =

5

E. doStuff x = 5 main x =

6

F. doStuff x = 6 main x =

5

Answer: D

 

NO.2 Given:

1. public class Score implements Comparable<Score> {

2. private int wins, losses;

3. public Score(int w, int l) { wins = w; losses = l; }

4. public int getWins() { return wins; }

5. public int getLosses() { return losses; }

 

NO.3 }

 

NO.4 // insert code here

 

NO.5 Given:

1. public class GC {

2. private Object o;

3. private void doSomethingElse(Object obj) { o = obj; }

4. public void doSomething() {

5. Object o = new Object();

6. doSomethingElse(o);

7. o = new Object();

8. doSomethingElse(null);

9. o = null;

10. }

11. }

When the doSomething method is called, after which line does the Object created in line 5

become available for garbage collection?

A. Line 5

B. Line 6

C. Line 7

D. Line 8

E. Line 9

F. Line 10

Answer: D

 

NO.6 System.out.println(sb1 + " " + s1)

;

Which code fragment, inserted at line 24, outputs "123abc 123abc"

?A. sb1.append("abc"); s1.append("abc")

;

B. sb1.append("abc"); s1.concat("abc")

;

C. sb1.concat("abc"); s1.append("abc")

;

D. sb1.concat("abc"); s1.concat("abc")

;

E. sb1.append("abc"); s1 = s1.concat("abc")

;

F. sb1.concat("abc"); s1 = s1.concat("abc")

;

G. sb1.append("abc"); s1 = s1 + s1.concat("abc")

;

H. sb1.concat("abc"); s1 = s1 + s1.concat("abc")

;

Answer: E

18.Given that the current directory is empty, and that the user has read and write permissions, and the

following:

11. import java.io.*;

12. public class DOS {

13. public static void main(String[] args) {

14. File dir = new File("dir");

15. dir.mkdir();

16. File f1 = new File(dir, "f1.txt");

17. try {

18. f1.createNewFile();

19. } catch (IOException e) { ; }

20. File newDir = new File("newDir");

21. dir.renameTo(newDir);

22. }

23.

}

Which statement is true?

A. Compilation fails.

B. The file system has a new empty directory named dir.

C. The file system has a new empty directory named newDir.

D. The file system has a directory named dir, containing a file f1.txt.

E. The file system has a directory named newDir, containing a file f1.txt.

Answer: E

19.Given:

11. class Converter {

12. public static void main(String[] args) {

13. Integer i = args[0];

14. int j = 12;

15. System.out.println("It is " + (j==i) + " that j==i.");

16. }

17. }

What is the result when the programmer attempts to compile the code and run it with the

command java Converter 12?

A. It is true that j==i.

B. It is false that j==i.

C. An exception is thrown at runtime.

D. Compilation fails because of an error in line 13.

Answer: D

20.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"?

A. String regex = "";

B. String regex = " ";

C. String regex = ".*";

D. String regex = "\\s";

E. String regex = "\\.\\s*";

F. String regex = "\\w[ \.] +";

Answer: E

21.Given:

5. import java.util.Date;

6. import java.text.DateFormat;

21. DateFormat df;

22. Date date = new Date();

23. // insert code here

24. String s = df.format(date);

Which code fragment, inserted at line 23, allows the code to compile?

A. df = new DateFormat();

B. df = Date.getFormat();

C. df = date.getFormat();

D. df = DateFormat.getFormat();

E. df = DateFormat.getInstance();

Answer: E

22.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"?

A. import utils.*;

B. static import utils.*;

C. import utils.Repetition.*;

D. static import utils.Repetition.*;

E. import utils.Repetition.twice();

F. import static utils.Repetition.twice;

G. static import utils.Repetition.twice;

Answer: F

23.A UNIX user named Bob wants to replace his chess program with a new one, but he is not sure where

the old one is installed. Bob is currently able to run a Java chess program starting from his home directory

/home/bob using the command: java -classpath /test:/home/bob/downloads/*.jar

games.Chess Bob's CLASSPATH is set (at login time) to:

/usr/lib:/home/bob/classes:/opt/java/lib:/opt/java/lib/*.jar What is a possible location for the

Chess.class file?

A. /test/Chess.class

B. /home/bob/Chess.class

C. /test/games/Chess.class

D. /usr/lib/games/Chess.class

E. /home/bob/games/Chess.class

F. inside jarfile /opt/java/lib/Games.jar (with a correct manifest)

G. inside jarfile /home/bob/downloads/Games.jar (with a correct manifest)

Answer: C

24.Given:

3. interface Animal { void makeNoise(); }

4. class Horse implements Animal {

5. Long weight = 1200L;

6. public void makeNoise() { System.out.println("whinny"); }

7. }

8. public class Icelandic extends Horse {

9. public void makeNoise() { System.out.println("vinny"); }

10. public static void main(String[] args) {

11. Icelandic i1 = new Icelandic();

12. Icelandic i2 = new Icelandic();

13. Icelandic i3 = new Icelandic();

14. i3 = i1; i1 = i2; i2 = null; i3 = i1;

15. }

16.

}

When line 15 is reached, how many objects are eligible for the garbage collector?A. 0

B. 1

C. 2

D. 3

E. 4

F. 6

Answer: E

25.Click the Exhibit button. Given the fully-qualified class names: com.foo.bar.Dog

com.foo.bar.blatz.Book com.bar.Car com.bar.blatz.Sun Which graph represents the correct directory

structure for a JAR file from which those classes can be used by the compiler and JVM?

A. Jar A

B. Jar B

C. Jar C

D. Jar D

E. Jar E

Answer: A

 

NO.7 public int hashCode() {

 

NO.8 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. Remove line 14.

B. Replace line 14 with "int i = iter.next();".

C. Replace line 13 with "for (int i : intList) {".

D. Replace line 13 with "for (Iterator iter : intList) {".

E. Replace the method declaration with "sum(List<int> intList)".

F. Replace the method declaration with "sum(List<Integer> intList)".

Answer: A,C,F

 

 

 

Posted 2014/6/23 10:01:13  |  Category: Oracle  |  Tag: 1Z0-851인증덤프공부