This is not the document you are looking for? Use the search form below to find more!

Report home > Technology

Oracle 1Z0-851 test questions and answers

0.00 (0 votes)
Document Description
Oracle exam 1Z0-851 is one of the premier exams in the examination and certification industry. Advancing IT Professionals supplementing their know-how with excellent training from Exampdf. Quality Training materials are difficult to come by, and can costly a whole lot in both time and money. Exampdf IT certifications makes sure you do not waste any time and money on costly Training. Out low cost approach to exam preparation and training for 1Z0-851 is the optimal way to go about completion of the actual exams and tests.
File Details
Submitter
  • Username: oskar
  • Name: oskar
  • Documents: 250
Embed Code:

Add New Comment




Related Documents

Oracle 1Z0-228 test questions and answers

by: oskar, 4 pages

Oracle exam 1Z0-228 is one of the premier exams in the examination and certification industry. Advancing IT Professionals supplementing their know-how with excellent training from Exampdf. Quality ...

Oracle 1Z0-523 test questions and answers

by: oskar, 5 pages

Oracle exam 1Z0-523 is one of the premier exams in the examination and certification industry. Advancing IT Professionals supplementing their know-how with excellent training from Exampdf. Quality ...

Oracle 1Z0-532 test questions and answers

by: oskar, 3 pages

Oracle exam 1Z0-532 is one of the premier exams in the examination and certification industry. Advancing IT Professionals supplementing their know-how with excellent training from Exampdf. Quality ...

Oracle 1Z0-550 test questions and answers

by: oskar, 5 pages

Oracle exam 1Z0-550 is one of the premier exams in the examination and certification industry. Advancing IT Professionals supplementing their know-how with excellent training from Exampdf. Quality ...

Oracle 1Z0-850 test questions and answers

by: oskar, 8 pages

Oracle exam 1Z0-850 is one of the premier exams in the examination and certification industry. Advancing IT Professionals supplementing their know-how with excellent training from Exampdf. Quality ...

Oracle 1Z0-852 test questions and answers

by: oskar, 9 pages

Oracle exam 1Z0-852 is one of the premier exams in the examination and certification industry. Advancing IT Professionals supplementing their know-how with excellent training from Exampdf. Quality ...

Oracle 1Z0-858 test questions and answers

by: oskar, 18 pages

Oracle exam 1Z0-858 is one of the premier exams in the examination and certification industry. Advancing IT Professionals supplementing their know-how with excellent training from Exampdf. Quality ...

Oracle 1Z0-851 practice questions

by: oskar, 17 pages

Still looking for Oracle certification 1Z0-851 exam practice questions? Just come to Exampdf to get the newest and latest Oracle certification 1Z0-851 exam questions and answers. We has updated the ...

oracle 1z0-591 exam questions and answers

by: exammanual, 6 pages

latest and best oracle 1z0-591 questions and answers,download free demos here.

Ourexam 000-529 test questions and answers

by: happychengyuan, 4 pages

Ourexam 000-529 exam can give a deep insight of the latest updated 000-529 test questions and answers, all these latest materials are good for you and we guarantee that if you purchase our product, ...

Content Preview






Many new exams are available at Exampdf.com, such
as SY0-301, E22-275, 000-118, and so on. With
Exampdf real Q&As of any IT certification exam, all the
examinees can clear the exams easily. Take charge of
your time now.



The safer , easier way to help you pass any IT exams.
Exam : 1Z0-851
Title
:
J
a
v
a Standard Edition 6
Programmer Certified
Professional Exam
Version : Demo
1 / 16

The safer , easier way to help you pass any IT exams.
1.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
2.A programmer has an algorithm that requires a java.util.List that provides an efficient
implementation of add(0, object), but does NOT need to support quick random access. What supports
these requirements.?
A. java.util.Queue
B. java.util.ArrayList
C. java.util.LinearList
D. java.util.LinkedList
Answer: D
3.Given:
11. // insert code here
12. private N min, max;
13. public N getMin() { return min; }
14. public N getMax() { return max; }
15. public void add(N added) {
16. if (min == null || added.doubleValue() < min.doubleValue())
17. min = added;
18. if (max == null || added.doubleValue() > max.doubleValue())
19. max = added;
20. }
21.
}
Which two, inserted at line 11, will allow the code to compile? (Choose two.
)A. public class MinMax<?>
{
2 / 16

The safer , easier way to help you pass any IT exams.
B. public class MinMax<? extends Number>
{
C. public class MinMax<N extends Object>
{
D. public class MinMax<N extends Number>
{
E. public class MinMax<? extends Object>
{
F. public class MinMax<N extends Integer>
{
Answer: D,F
4.Given:
12. import java.util.*;
13. public class Explorer2 {
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(629);
21. System.out.println(s + " " + subs);
22. }
23.
}
What is the result?A. Compilation fails.
B. An exception is thrown at runtime.
C. [608, 610, 612, 629] [608, 610]
D. [608, 610, 612, 629] [608, 610, 629]
E. [606, 608, 610, 612, 629] [608, 610]
F. [606, 608, 610, 612, 629] [608, 610, 629]
Answer: E
5.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; }
6. public String toString() {
7. return "<" + wins + "," + losses + ">";
8. }
9. // insert code here
3 / 16

The safer , easier way to help you pass any IT exams.
10.
}
Which method will complete this class?A. public int compareTo(Object o){/*more code here*/
}
B. public int compareTo(Score other){/*more code here*/
}
C. public int compare(Score s1,Score s2){/*more code here*/
}
D. public int compare(Object o1,Object o2){/*more code here*/
}
Answer: B
6.Given
11. public class Person {
12. private name;
13. public Person(String name) {
14. this.name = name;
15. }
16. public int hashCode() {
17. return 420;
18. }
19.
}
Which statement is true?A. The time to find the value from HashMap with a Person key depends on the
size of the map.
B. Deleting a Person key from a HashMap will delete all map entries for all keys of type Person.
C. Inserting a second Person object into a HashSet will cause the first Person object to be
removed as a duplicate.
D. The time to determine whether a Person object is contained in a HashSet is constant and does NOT
depend on the size of the map.
Answer: A
7.Given:
5. import java.util.*;
6. public class SortOf {
7. public static void main(String[] args) {
8. ArrayList<Integer> a = new ArrayList<Integer>();
9. a.add(1); a.add(5); a.add(3);
11. Collections.sort(a);
12. a.add(2);
13. Collections.reverse(a);
14. System.out.println(a);
15. }
16.
4 / 16

The safer , easier way to help you pass any IT exams.
}
What is the result?A. [1, 2, 3, 5]
B. [2, 1, 3, 5]
C. [2, 5, 3, 1]
D. [5, 3, 2, 1]
E. [1, 3, 5, 2]
F. Compilation fails.
G. An exception is thrown at runtime.
Answer: C
8.Given
11. public interface Status {
12. /* insert code here */ int MY_VALUE = 10;
13. } Which three are valid on line
12?
(Choose three.
)A. final
B. static
C. native
D. public
E. private
F. abstract
G. protected
Answer: A,B,D
9.Given:
5. class Atom {
6. Atom() { System.out.print("atom "); }
7. }
8. class Rock extends Atom {
9. Rock(String type) { System.out.print(type); }
10. }
11. public class Mountain extends Rock {
12. Mountain() {
13. super("granite ");
14. new Rock("granite ");
15. }
16. public static void main(String[] a) { new Mountain(); }
17. }
What is the result?
A. Compilation fails.
B. atom granite
C. granite granite
D. atom granite granite
5 / 16


The safer , easier way to help you pass any IT exams.
E. An exception is thrown at runtime.
F. atom granite atom granite
Answer: F
10.Click the Exhibit button. Which three statements are true? (Choose three.)
A. Compilation fails.
B. The code compiles and the output is 2.
C. If lines 16, 17 and 18 were removed, compilation would fail.
D. If lines 24, 25 and 26 were removed, compilation would fail.
E. If lines 16, 17 and 18 were removed, the code would compile and the output would be 2.
F. If lines 24, 25 and 26 were removed, the code would compile and the output would be 1.
Answer: B,E,F
11.Given:
10. class Line {
11. public class Point { public int x,y;}
12. public Point getPoint() { return new Point(); }
13. }
14. class Triangle {
15. public Triangle() {
16. // insert code here
17. }
18.
}
Which code, inserted at line 16, correctly retrieves a local instance of a Point object?A. Point p =
6 / 16

The safer , easier way to help you pass any IT exams.
Line.getPoint()
;
B. Line.Point p = Line.getPoint()
;
C. Point p = (new Line()).getPoint()
;
D. Line.Point p = (new Line()).getPoint()
;
Answer: D
12.Given:
11. class Alpha {
12. public void foo() { System.out.print("Afoo "); }
13. }
14. public class Beta extends Alpha {
15. public void foo() { System.out.print("Bfoo "); }
16. public static void main(String[] args) {
17. Alpha a = new Beta();
18. Beta b = (Beta)a;
19. a.foo();
20. b.foo();
21. }
22.
}
What is the result?
A. Afoo Afoo
B. Afoo Bfoo
C. Bfoo Afoo
D. Bfoo Bfoo
E. Compilation fails.
F. An exception is thrown at runtime.
Answer: D
13.Click the Exhibit button.
Which statement is true about the classes and interfaces in the exhibit?
7 / 16


The safer , easier way to help you pass any IT exams.
A. Compilation will succeed for all classes and interfaces.
B. Compilation of class C will fail because of an error in line 2.
C. Compilation of class C will fail because of an error in line 6.
D. Compilation of class AImpl will fail because of an error in line 2.
Answer: C
14.Which two code fragments correctly create and initialize a static array of int elements? (Choose two.)
A. static final int[] a = { 100,200 };
B. static final int[] a;
static { a=new int[2]; a[0]=100; a[1]=200;
}
C. static final int[] a = new int[2]{ 100,200 }
;
D. static final int[] a;
static void init() { a = new int[3]; a[0]=100; a[1]=200;
}
Answer: A,B
15.Given:
10. interface Foo { int bar(); }
11. public class Sprite {
12. public int fubar( Foo foo ) { return foo.bar(); }
13. public void testFoo() {
14. fubar(
8 / 16

The safer , easier way to help you pass any IT exams.
15. // insert code here
16. );
17. }
18.
}
Which code, inserted at line 15, allows the class Sprite to compile?A. Foo { public int bar() { return 1;
}
B. new Foo { public int bar() { return 1;
}
C. new Foo() { public int bar() { return 1;
}
D. new class Foo { public int bar() { return 1; }
Answer: C
16.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?A. 2
B. 3
C. 4
D. 6
E. 7
F. Compilation fails.
Answer: E
17.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"
?A. sb1.append("abc"); s1.append("abc")
;
B. sb1.append("abc"); s1.concat("abc")
;
C. sb1.concat("abc"); s1.append("abc")
;
9 / 16

Download
Oracle 1Z0-851 test questions and answers

 

 

Your download will begin in a moment.
If it doesn't, click here to try again.

Share Oracle 1Z0-851 test questions and answers to:

Insert your wordpress URL:

example:

http://myblog.wordpress.com/
or
http://myblog.com/

Share Oracle 1Z0-851 test questions and answers as:

From:

To:

Share Oracle 1Z0-851 test questions and answers.

Enter two words as shown below. If you cannot read the words, click the refresh icon.

loading

Share Oracle 1Z0-851 test questions and answers as:

Copy html code above and paste to your web page.

loading