I think thear are two correct answers:
*) mysq = new Square(20);
*) mysq.setSide(20);
Because after mysq = new Square(20) mysq refered to Square object and it side == 20. Despite the fact that this is a new object, this does not contradict the wording of the question!
About Question enthuware.ocajp.i.v8.2.890 :
Moderator: admin
-
- Posts: 8
- Joined: Wed Oct 25, 2017 2:53 am
- Contact:
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v8.2.890 :
The problem statement clearly says that you need to modify the object pointed to by the variable in the given code.
Also, you need to select only one option, while your answer requires you to select two options.
Also, you need to select only one option, while your answer requires you to select two options.
Who is online
Users browsing this forum: Bing [Bot] and 46 guests