-Code
class Solution {
public String solution(String phone_number) {
return "*".repeat(phone_number.length() - 4) + phone_number.substring(phone_number.length() - 4);
}
}
'Beakjoon&프로그래머스 > Java' 카테고리의 다른 글
[프로그래머스/Java] 가운데 글자 가져오기 (0) | 2025.02.24 |
---|---|
[프로그래머스/Java] 내적 (0) | 2025.02.24 |
[프로그래머스/Java] 제일 작은 수 제거하기 (0) | 2025.02.24 |
[프로그래머스/Java] 없는 숫자 더하기 (0) | 2025.02.24 |
[프로그래머스/Java] 콜라츠 추측 (0) | 2025.02.24 |