This site requires JavaScript, please enable it in your browser!
Greenfoot back
Sauravbasyalking12
Sauravbasyalking12 wrote ...

2021/2/16

Greenfoot

Sauravbasyalking12 Sauravbasyalking12

2021/2/16

#
explain the preferred access modifier used for both variables and methods
danpost danpost

2021/2/17

#
Sauravbasyalking12 wrote...
explain the preferred access modifier used for both variables and methods
It varies on usage. For example, getter and setter methods are generally public and the fields they deal with are private.
You need to login to post a reply.