0
When defining a setter how would i code the value of the setter to be dependent on user input vs a static value?
Getters and setters
2 Respuestas
+ 2
You could do something like this:
https://code.sololearn.com/cu7gsxBIvaYu/#java
the setter still has a variable as argument, but when you call it, the value passed can come from a scanner.
0
Thanks Tibor