News

Free Sample Java Certification Exam questions by Oracle

java exam questions
Written by Mushfiq Mammadov

Oracle published free sample questions related some java exams in Oracle Blogs.  The list of these exams are:

Java SE 7 Programmer I | 1Z0-803

1. Given:

What is the result?
A) 20
B) 100
C) 1000
D) 2

..more questions and answers..

Java SE 7 Programmer I | 1Z0-804

1. Given:

And the code fragment:

What is the result?
A) 2 3 5 7
B) 2 7 5 3
C) 7 5 3 2
D) Compilation fails.

..more questions and answers..

Upgrade to Java SE 7 Programmer | 1Z0-805

1. Given:

What is the result?
A) t 2 1 f
B) t 1 2 f
C) Compilation fails due to errors on lines A1 and B1.
D) Compilation fails due to errors on lines A2 and B2.

..more questions and answers..

Java SE 8 Programmer I | 1Z0-808

1. Given:

What is the result?
A) null
B) 10
C) 0
D) An IndexOutOfBoundsException is thrown at runtime.

..more questions and answers..

Java SE 8 Programmer II | 1Z0-809

1. Given:

Which two statements are true about Customer?
A) The Customer class cannot be extended.
B) The Customer class cannot be instantiated.
C) Subclasses of Customer cannot override getName() method.
D) Concrete subclasses of Customer must use a default constructor.
E) Concrete subclasses of Customer must implement the buy() method.
F) Subclasses of Customer must implement the buy() method.

..more questions and answers..

Upgrade Java SE 7 to Java SE 8 OCP Programmer | 1Z0-810

1. Given the code fragment:

Which code fragment can be inserted at Line n1 to enable the class compile?

A)    private class Invoice {
void print() { System.out.println("Invoice Printed"); }
}

B)    public class Invoice {
void print() {System.out.println("Invoice Printed");}
}

C)    class Invoice {
void print() {System.out.println("Invoice Printed");}
}

D)   protected class Invoice {
void print() {System.out.println("Invoice Printed");}
}

..more questions and answers..

Upgrade to Java SE 8 OCP ( Java SE 6 and all prior versions) | 1Z0-813

1. Which code fragment correctly assign a numeric literal?

A) byte b1 = b1011;
B) byte b2 = 1011b;
C) byte b3 = 0b1001;
D) byte b4 = 0xb001;

..more questions and answers..

Java SE 5 and 6, Certified Associate | 1Z0-850

1) You are creating a space flight simulation for a start-up aeronautics company. This simulation program must calculate the orbital mechanics and display the flight path on a graphics screen.

What type of data is most appropriate for calculating the orbital mechanics equations?
a) pixel
b) boolean
c) integer
d) floating point (*)
e) enumerated type

..more questions and answers..

Java SE 6 Programmer Certified Professional | 1Z0-851

1) Given:

And four declarations:
I.   Foo doStuff(int x) { return new Foo(); }
II.  Foo doStuff(int x) { return new SuperFoo(); }
III. SuperFoo doStuff(int x) { return new Foo(); }
IV.  SuperFoo doStuff(int y) { return new SuperFoo(); }

Which, inserted independently at line 8, will compile?
a) Only I.
b) Only IV.
c) Only I and III.
d) Only I, II, and III.
e) Only I, III, and IV. (*)
f) All four declarations will compile.

..more questions and answers..

Source: Oracle Blog

About the author

Mushfiq Mammadov

Leave a Comment

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.