Courseiva
Question 239 of 481
Primitives, Strings and OperatorsmediumMultiple ChoiceObjective-mapped

Which Java Primitive Stores a Single Character? The char Type

Which primitive type can store a single character?

Quick Answer

char is the only one of Java's eight primitive types built specifically to represent a single character rather than a number, and understanding what it actually stores underneath clarifies why it behaves the way it does in code. It's a 16-bit unsigned type that holds a Unicode code point value from 0 up to 65535, meaning a char is fundamentally a numeric value that Java interprets and displays as a character — which is why char values can be used in arithmetic expressions and compared using numeric operators, and why casting between char and int is a legal, common operation. This numeric-underneath, character-on-the-surface design is what lets Java support the full range of Unicode characters in a fixed-width type rather than needing a variable-length encoding for basic character storage. It's worth distinguishing char from String, which represents a sequence of characters as an object rather than a single primitive value — a common point of confusion for anyone newer to Java's type system, since single characters in code are wrapped in single quotes while strings use double quotes, reflecting this exact underlying distinction.

⚠ Common exam trap

Oracle often tests the distinction between primitive types and reference types, and the trap here is that candidates mistakenly choose `String` because they associate it with characters, forgetting that `String` is not a primitive type and is designed for sequences, not single characters.

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

char

The `char` primitive type in Java is specifically designed to store a single 16-bit Unicode character, ranging from '\u0000' (0) to '\uffff' (65535). It is the only primitive type that directly represents a character value, making it the appropriate choice for storing a single character.

Answer analysis

Option-by-option breakdown

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

  • String

    Why it's wrong here

    String is not a primitive.

  • byte

    Why it's wrong here

    byte stores integers.

  • short

    Why it's wrong here

    short stores integers.

  • char

    Why this is correct

    Correct.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. 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 primitive type can store a single character?

easy
  • A.String
  • B.char
  • C.int
  • D.Character

Why B: char is the primitive for a single 16-bit Unicode character.

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.