Courseiva
Primitives, Strings and OperatorseasyMultiple ChoiceObjective-mapped

1Z0-811 Primitives, Strings and Operators Practice Question

Which primitive type has a default value of 0.0f?

⚠ Common exam trap

Oracle often tests the distinction between float and double default values, where candidates mistakenly choose double (0.0d) because they overlook the 'f' suffix requirement for float literals.

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

float

In Java, the default value for a float primitive is 0.0f. This is because float is a 32-bit IEEE 754 floating-point type, and its default initialization is 0.0f (with the 'f' suffix to denote a float literal). Option A is correct because it directly matches this specification.

Answer analysis

Option-by-option breakdown

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

  • float

    Why this is correct

    float default is 0.0f.

  • long

    Why it's wrong here

    long default is 0L.

  • double

    Why it's wrong here

    double default is 0.0d.

  • int

    Why it's wrong here

    int default is 0.

About these practice questions

One of 481 original 1Z0-811 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.