문제 링크
https://school.programmers.co.kr/learn/courses/30/lessons/181873
class Solution {
public String solution(String my_string, String alp) {
return my_string.replace(alp,alp.toUpperCase());
}
}
문자열 치환 + 대문자 변경
replace 메서드 toUpperCase 메서드를 사용했다.
320x100
'PRACTICE > JAVA' 카테고리의 다른 글
[프로그래머스] 원하는 문자열 찾기 (0) | 2025.02.25 |
---|---|
[프로그래머스] A 강조하기 (0) | 2025.02.24 |
[프로그래머스] 문자열 바꿔서 찾기 (0) | 2025.02.22 |
[프로그래머스] rny_string (0) | 2025.02.21 |
[백준] 1546번 | 평균 (0) | 2025.02.20 |