본문 바로가기

Coding Test/프로그래머스

[프로그래머스/자바] 더 크게 합치기

class Solution {
    public int solution(int a, int b) {
        String a1 = "" + a + b;
        String b1 = "" + b + a;
        a = Integer.parseInt(a1);
        b = Integer.parseInt(b1);
        return a >= b ? a : b;
    }
}