특정 문자 제거 (replace)

han.user();·2023년 2월 28일
0
post-thumbnail

class Solution {
    public String solution(String my_string, String letter) {
        String answer = "";
        
        for(char c:letter.toCharArray()) {
            answer = my_string.replace(String.valueOf(c), "");
        }
        return answer;
    }
}

profile
I'm still hungry.

0개의 댓글