About Question enthuware.ocajp.i.v7.2.1123 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
admin
Site Admin
Posts: 10055
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1123 :

Post by admin »

Not sure what making the constructor protected has to do with printing an output. Why are you expecting that it will print something if you make the constructor protected? Do you see print method getting called anywhere??
If you like our products and services, please help us by posting your review here.

olsongrant
Posts: 8
Joined: Mon Nov 02, 2020 10:21 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1123 :

Post by olsongrant »

I think the test-taker typically expects there to be an answer choice representing how the program would behave, if only it were to compile. From that perspective, the "It will print A" and "It will print B" answer choices might be unsatisfying, as the print() method is never called by the main() method or by the constructors. Maybe some folks would consider it an improvement if "The program runs but nothing is printed" were added as an answer choice.

admin
Site Admin
Posts: 10055
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1123 :

Post by admin »

Thanks for your suggest. There is "None of the above" option already there though.
Also, when you have a definite answer "It will not compile", then there is little scope for any output at runtime.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 42 guests