Courseiva
Java Basics and SyntaxmediumMultiple SelectObjective-mapped

1Z0-811 Java Basics and Syntax Practice Question

Which TWO statements about constructors are true? (Choose two.)

⚠ Common exam trap

Oracle often tests the misconception that constructors have a return type of void, or that the compiler always provides a default constructor, even when other constructors are defined.

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

Constructors have no return type

Constructors in Java do not have a return type, not even void. If a return type is specified, the Java compiler treats the method as a regular method, not a constructor. This is a fundamental syntactic rule defined in the Java Language Specification (JLS §8.8).

Answer analysis

Option-by-option breakdown

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

  • Constructors have no return type

    Why this is correct

    Constructors are special methods with no return type.

  • The compiler always provides a default constructor

    Why it's wrong here

    Only if no constructor is explicitly defined.

  • A default constructor is provided if no constructor is defined

    Why this is correct

    If no constructor is defined, the compiler generates a default no-arg constructor.

  • Constructors can be declared as abstract

    Why it's wrong here

    Constructors cannot be abstract or static.

  • Constructors have a return type of void

    Why it's wrong here

    Constructors do not have any return type, not even void.

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

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.