What is an accessor?

Answers were Sorted based on User's Feedback



What is an accessor?..

Answer / ritesh pal

An accessor is a class operation that does not modify the state of an object. The accessor functions need to be declared as const operations

Is This Answer Correct ?    0 Yes 0 No

What is an accessor?..

Answer / Prafull Gupta

In Java, an Accessor (also known as Getter or Access Method) is a method that allows you to retrieve the value of a private instance variable. It's often used in encapsulation to provide controlled access to an object's state.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Can memory leak in java?

1 Answers  


Describe what a thread-local variable is in java?

1 Answers  


What is super?

1 Answers  


Why declare Main() inside the class in java ?

1 Answers   HCL,


What modifiers are allowed for methods in an interface?

1 Answers  


What do you mean by platform independence? What is an interface?

1 Answers  


What is prefix of a string?

1 Answers  


What are recursive functions?

1 Answers  


Does 'true' and 'false' are keywords?

5 Answers  


When will we use class loader?

2 Answers  


Explain about java sdk?

1 Answers  


Can we sort arraylist in java?

1 Answers  


Categories