enthuware.ocajp.i.v8.2.876 issue?

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

Moderator: admin

Post Reply
BSilviu
Posts: 7
Joined: Wed Feb 01, 2023 9:00 am
Contact:

enthuware.ocajp.i.v8.2.876 issue?

Post by BSilviu »

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?

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

Re: enthuware.ocajp.i.v8.2.876 issue?

Post by admin »

If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 49 guests