[프로그래머스]문자열의 뒤의 n글자

박예림·2023년 5월 25일
0

코테

목록 보기
102/132

class Solution {
    public String solution(String my_string, int n) {
        String answer = "";
        
        answer = my_string.substring(my_string.length()-n, my_string.length());
        
        return answer;
    }
}
profile
응애 나 아기개발자

0개의 댓글