Day 17

강태훈·2026년 1월 21일

nbcamp TIL

목록 보기
17/58
OperatorType operatorType = OperatorType.fromChar(operator);

문자(char) 하나를 받아서
그에 대응하는 OperatorType enum 객체를 찾아온다


OperatorType(char symbol) {
    this.symbol = symbol;
}

→ enum 객체 생성
→ 생성자 호출
this.symbol = '+'



5번이나 반복하면서 숙달은 되었는데 아직도 기초적인 용법에서 틀리는 바람에 오류가 많이 발생합니다.

0개의 댓글