보기보기 개발 블로그

프로그래머스(JAVA) / 숫자 비교하기 본문

프로그래머스

프로그래머스(JAVA) / 숫자 비교하기

bokboks 2023. 3. 18. 00:08


class Solution {
    public int solution(int num1, int num2) {
        int answer = 0;
        if(num1 == num2){
        answer = 1;
        }else{
            answer = -1;
        }
        return answer;   
    }
}