Getters and setters
getters and setters (accessors - getters: accessors, setters: mutators - 특정 클래스를 생성할때, 데이터를 보호하기 위해서 사용. - 코드를 직접 수정하지 않고 www.freecodecamp.org/news/java-getters-and-setters/ Getters and Setters in Java Explained Getters and setters are used to protect your data, particularly when creating classes. For each instance variable, a getter method returns its value while a setter method sets or updates..
JAVA
2021. 5. 3. 09:21
공지사항