0
There is no need to use constructor here. Use only get and set methods. The set method is used later on in your main method to set the value, example: v1.setColor("green"); And the get method will return the value when you gonna print it out, example: System.out.println(v1.getColor()); I got a code you can check how it works: https://code.sololearn.com/cpAdKz68c2j5/#java
6th Mar 2019, 4:46 PM
JavaBobbo
JavaBobbo - avatar