About Question enthuware.ocajp.i.v7.2.1123 :
Moderator: admin
-
- Site Admin
- Posts: 10055
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1123 :
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.
-
- Posts: 8
- Joined: Mon Nov 02, 2020 10:21 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1123 :
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.
-
- Site Admin
- Posts: 10055
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1123 :
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.
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.
Who is online
Users browsing this forum: Bing [Bot] and 42 guests