enthuware.ocajp.i.v8.2.876 issue?
Posted: Sat Mar 25, 2023 9:39 am
Hi Guys,
Encountered this question, and I think something might be wrong:
https://imgur.com/a/fFqlaAX
The correct answers are:
Make the side field private and remove the area field.
Change getArea method to:
public double getArea(){ return side*side; }
The thing is if area is removed, in TestClass, how is possible to access it via sq.area = ....
Am I missing something?
Encountered this question, and I think something might be wrong:
https://imgur.com/a/fFqlaAX
The correct answers are:
Make the side field private and remove the area field.
Change getArea method to:
public double getArea(){ return side*side; }
The thing is if area is removed, in TestClass, how is possible to access it via sq.area = ....
Am I missing something?