Oracle Java SE 21 Developer Professional 1z0-830 Question # 25 Topic 3 Discussion

Oracle Java SE 21 Developer Professional 1z0-830 Question # 25 Topic 3 Discussion

1z0-830 Exam Topic 3 Question 25 Discussion:
Question #: 25
Topic #: 3

Given:

java

public class Versailles {

int mirrorsCount;

int gardensHectares;

void Versailles() { // n1

this.mirrorsCount = 17;

this.gardensHectares = 800;

System.out.println("Hall of Mirrors has " + mirrorsCount + " mirrors.");

System.out.println("The gardens cover " + gardensHectares + " hectares.");

}

public static void main(String[] args) {

var castle = new Versailles(); // n2

}

}

What is printed?


A.

nginx

Hall of Mirrors has 17 mirrors.

The gardens cover 800 hectares.


B.

Nothing


C.

An exception is thrown at runtime.


D.

Compilation fails at line n1.


E.

Compilation fails at line n2.


Get Premium 1z0-830 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.