본문 바로가기

Coding Test/프로그래머스

[프로그래머스/자바] 숫자 비교하기

class Solution {
    public int solution(int num1, int num2) {
        return (num1-num2 == 0)? 1 : -1;
    }
}

class Solution {
    public int solution(int num1, int num2) {
        return (num1==num2)? 1 : -1;
    }
}