Introduction
By installing java IDE, you can automatically generate java getter and setters.
Installation
VS code extension that creates automatically Getters and Setters is Java IDE
- Open java file with Visual Studio Code
- Download Extention: Java IDE
- ctrl (command) + shift + p => type: getter setter. and Enter
public class People {
private String name;
private int age;
private String language;
/**
* @return String return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return int return the age
*/
public int getAge() {
return age;
}
/**
* @param age the age to set
*/
public void setAge(int age) {
this.age = age;
}
/**
* @return String return the language
*/
public String getLanguage() {
return language;
}
/**
* @param language the language to set
*/
public void setLanguage(String language) {
this.language = language;
}
}