public String solution(String phone_number) {
int len = phone_number.length() - 4;
String asterisks = "*".repeat(len);
String lastFourDigits = phone_number.substring(len);
return asterisks + lastFourDigits;
}
출처:https://school.programmers.co.kr/learn/courses/30/lessons/12948