↓ Try a sample question (with explanation)

Oracle · Practice questions

1Z0-808 Java SE 8 Programmer I

Study 219 1Z0-808 Java SE 8 Programmer I practice questions with explanations. 22 of them are free to try, no sign-up needed.

Buy to unlock all questions, full reading mode and PDFs.

About this question bank

Questions
219 in total
Free to try
22 questions (no sign-up)
Exam domains
6 domains
Price
JPY 1,500 (≈ US$10; shown in your local currency at checkout) · one-time payment · 3 months
PDF
Japanese–English · Chinese–English · Korean–English · English (for buyers)
Data version
2026-12

About this exam

Oracle's certification exam for Java SE 8; passing it earned the Oracle Certified Associate, Java SE 8 Programmer credential. Both the Japanese-language version (1Z0-808-JPN) and the English version are no longer offered. It covered data types and variables, operators, control flow, arrays, methods and encapsulation, inheritance, String and StringBuilder, and exception handling.

Try a sample question

This is an original sample question written by itmoshi based on the exam objectives.

What is the output when the program in the exhibit is compiled and run?

Exhibit
public class Calc {
    public static void main(String[] args) {
        System.out.println(1 + 2 + "3" + 4 * 5 + 6);
    }
}
  1. A33206
  2. B3326
  3. C123206
  4. DCompilation error
Show answer and explanation

Answer:A The output is 33206.

Why it is correct

Because * binds tighter than +, the expression groups as (((1 + 2) + "3") + (4 * 5)) + 6, and the + operators are evaluated left to right. 1 + 2 are both ints, so they are added to give 3; 3 + "3" has a String operand, so it concatenates to "33"; the product 4 * 5, which is 20, is appended to give "3320"; and appending 6 gives "33206". Once the left side is a String, every following + is concatenation.

The other options

  • ✗ B This adds 20 and 6 as numbers (26) before concatenating. Once the left operand is a String, every later + concatenates, so 20 and 6 are never added together.
  • ✗ C This treats 1 + 2 as concatenation too. Before any String appears, + between ints is ordinary addition.
  • ✗ D Joining a String and an int with + is valid; the int is converted to a string automatically. A compilation error would occur if, for example, you assigned a String to an int variable.

Key takeaway

Evaluating +: * and / bind tighter than +, and a chain of + groups left to right. Each + concatenates if either of its operands is a String and adds only when both are numeric. In this expression the + with "3" produces a String, so every later + in the chain concatenates. Use parentheses for parts you want added numerically.

Try 22 questions like this for free

Most frequent topics

  1. Java data types and variables62 questions
  2. Operators and control flow statements37 questions
  3. Inheritance and polymorphism22 questions
  4. Declaring and using arrays19 questions
  5. Methods and encapsulation18 questions
  6. Working with String and StringBuilder15 questions

Number of questions per topic among the 219 in this bank (top topics), as classified by itmoshi.

Exam domains

  1. Java Basics117 questions
  2. Arrays and Collections29 questions
  3. Object-Oriented Programming41 questions
  4. Exception Handling9 questions
  5. Core Java API Classes20 questions
  6. Lambda Expressions and Functional Interfaces3 questions

Other Oracle exams

← All exams

itmoshi is an unofficial study service and is not affiliated with Oracle or any exam provider.