Online Access Free 1Z0-853 Exam Questions

Exam Code:1Z0-853
Exam Name:Java Standard Edition 5 Programmer Certified Professional Exam
Certification Provider:Oracle
Free Question Number:362
Posted:Sep 08, 2025
Rating
100%

Question 1

Click the Exhibit button. What is the result?

Question 2

Given:
1.class Pizza {
2.java.util.ArrayList toppings;
3.public final void addTopping(String topping) {
4.toppings.add(topping);
5.}
6.}
7.public class PepperoniPizza extends Pizza {
8.public void addTopping(String topping) {
9.System.out.println("Cannot add Toppings");
10.
}
11.
public static void main(String[] args) {
12.
Pizza pizza = new PepperoniPizza();
13.
pizza.addTopping("Mushrooms");
14.
}
15.
}
What is the result?

Question 3

Given:
1.public class Drink implements Comparable {
2.public String name;
3.public int compareTo(Object o) {
4.return 0;
5.}
6.}
and:
20.
Drink one = new Drink();
21.
Drink two = new Drink();
22.
one.name= "Coffee";
23.
two.name= "Tea";
23.
TreeSet set = new TreeSet();
24.
set.add(one);
25.
set.add(two);
A programmer iterates over the TreeSet and prints the name of each Drink object.
What is the result?

Question 4

Given:
1.public class TestOne {
2.public static void main (String[] args) throws Exception {
3.Thread.sleep(3000);
4.System.out.println("sleep");
5.}
6.}
What is the result?

Question 5

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?

Add Comments

Your email address will not be published. Required fields are marked *

insert code
Type the characters from the picture.