간단한 질문이지만 이해할 수 없습니다. is
접두어명명 규칙에 따라 "has"접두사가있는 Java 부울 설정자
예 :
private boolean active;
public boolean isActive(){...};//getter
public boolean setActive(boolean b){...};//setter
하지만 has
접두사로 세터을 수행하는 방법을 이해하지 못하는 우리가 hasChildren, hasAttributes에 대해 이야기 할 때, 우리가 여부에 대해 얘기
private boolean hasChildren;
public boolean hasChildren(){...};//getter
public boolean ?(boolean b){...}//setter
'setHasChildren'? 의미 론적으로 명확한 한 그렇게 중요하지 않습니다 ... – Dici