Courseiva
Primitives, Strings and OperatorseasyMultiple SelectObjective-mapped

1Z0-811 Primitives, Strings and Operators Practice Question

Which two of the following are primitive data types in Java? (Choose two)

⚠ Common exam trap

Test-takers frequently confuse wrapper classes (like `Integer`, `Character`) with their corresponding primitive types, especially when the wrapper name closely resembles the primitive name (e.g., `Integer` vs `int`).

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

boolean

`boolean` is a primitive data type in Java that can hold only two values: `true` or `false`. It is not an object and does not have methods, making it a fundamental building block for conditional logic.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • boolean

    Why this is correct

    boolean is a primitive type.

  • double

    Why this is correct

    double is a primitive type.

  • Character

    Why it's wrong here

    Character is a wrapper class.

  • String

    Why it's wrong here

    String is a reference type.

  • Integer

    Why it's wrong here

    Integer is a wrapper class, not primitive.

About these practice questions

This 1Z0-811 question is part of Courseiva's 481-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on 1Z0-811

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Which two of the following are primitives in Java? (Choose two.)

medium
  • A.byte
  • B.char
  • C.String
  • D.Integer
  • E.Boolean

Why A: A is correct because `byte` is a primitive data type in Java that stores 8-bit signed integers, ranging from -128 to 127. It is one of the eight primitive types defined in the Java language specification, not an object or reference type.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 1Z0-811 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-811 exam.