You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why ? 숫자 혹은 문자열로 정의되어 있으면 이 값이 무슨 뜻을 의미하는지, 코드 작성자가 아니면 이해할 수 없음
시간이 지나면 코드 작성자도 이해할 수 없을듯 !!
숫자 1을 ONE로 짓는 의미없는 상수 변환은 피할 것
// 3이라는 숫자가 어떤걸 의미하는지 코드 작성자가 아니면 바로 이해할 수 없음if (splitArr.length == 3) {
...
// 수정 if문이 Manager이라는 것을 알 수 있음.if (isManager(splitArr.length)) {
...
// isManager 메서드에 3이라는 숫자가 하드코딩 되어있어서, 이 값도 유의미하게 변경하는게 좋을듯..?(맞나 ?!)privatestaticbooleanisManager(intlength) {
returnlength == 3;
}
// 예시 ..privatestaticbooleanisManager(intlength) {
returnlength == MAX_MANAGER_LENGTH;
}
The text was updated successfully, but these errors were encountered:
Converting int array to String array in java
매직넘버(매직 리터럴)
The text was updated successfully, but these errors were encountered: