About Question com.enthuware.jfcja.v8.2.418 :

Oracle Certified Foundations Associate Java Certification Questions and Discussion
1Z0-811

Moderator: admin

Post Reply
Veilok
Posts: 3
Joined: Sat Sep 01, 2018 10:53 am
Contact:

About Question com.enthuware.jfcja.v8.2.418 :

Post by Veilok »

"They allow setting and retrieval of private data elements of an instance"
"Accessor methods means the methods that modify or read the instance data fields of a class. Conventionally, the method that reads the field named xxx is named getXxx and the method that sets its value is named setXxx. That is why, accessor methods are also known as getters and setters."

Isn't it true that accessors retrieve data from an object, while mutators modify or set data in an object?

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

Re: About Question com.enthuware.jfcja.v8.2.418 :

Post by admin »

Yes, that is true. Technically, accessor == get and mutator == set.
Generally, people (although incorrectly) use the term accessors for both.
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 126 guests