+ 2

Is it necessary that we use setters and getters whenever we use constructors?

Explain using programme in java, where we only use constructors and not getters and setters, if possible

1st Jan 2019, 1:27 PM
Mohammed Naheen
Mohammed Naheen - avatar
1 Respuesta
0
You have to use getters and setters if you know that you'll need to change by user/return value of variable you declared in the class.
7th Jun 2019, 8:53 AM
Eliya Ben Baruch
Eliya Ben Baruch - avatar