toUpperCase()1 [ 프로그래머스 ] 특정한 문자를 대문자로 바꾸기 문제 풀이 특정 문자열을 바꿀 때는 replace()를 사용한다 replace() replace( 범위, 변환할 문자); my_string에서 alp의 문자를 대문자로 바꾸는 문제이므로 다음과 같은 코드를 짜주면 된다. String answer = my_string.replace(alp, toUpperCase()); //toUpperCase() : 소문자를 대문자로 변환 결과 2024. 1. 17. 이전 1 다음