Still busy writing setters and getters method manually? Actually, Eclipse IDE is able to help you generate the setters and getters method automatically, and this feature is bundle with Eclipse IDE long time ago, surprisingly, many Java developers are not aware of it?
See following steps to show you how.
1. Java Pojo
User.java, with 4 fields, but no getters and setters method.
2. Generate It
Right click on the file, select “Source” –> “Generate Getters and Setters…”
Choose which field you want to generate, and click on “OK” button.
All selected getters and setters methods will be generated automatically.
So, don’t create those methods manually, it waste time, use IDE.