[프로그래머스 / Java] 두 수의 차

Dreamer·2023년 12월 8일
0
post-thumbnail

문제

입문 문제6

나의 풀이

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

생각

class Solution {
    public int solution(int num1, int num2) {

        return num1-num2;
    }
}

앞으로는 코드 한 줄이라도 줄여보자.

profile
Moving forward based on records

0개의 댓글