How to call the getters and setters of inner class attributes in the TestApplication.java class?

So getters and setters are non-static methods (in most cases). What this means is that you will have to instantiate the object and then call the methods. So what you have to do is create Address instance Address a = new Address (...); and then you can use the instance to call your getters and setters, i.e. a.getZipCode(); etc

Leave a Comment