
[프로그래머스, Java] 문자열 나누기
·
CodingTest/Programmers
💡풀이class Solution { public int solution(String s) { int answer = 0; // A 라벨: continue A를 통해 이 while 루프의 처음으로 바로 돌아가기 위함 A: while(!s.isEmpty()) { for(int i = 0; i 📖새로 배운 부분💡replace와 replaceAllreplace : 바꾸려는 대상이 고정된 문자열일 때 (예: "apple", " ", "\n")replaceAll : 패턴으로 문자를 찾고 싶을 때 (예: "[0-9]" "[^p]" 등등) 관련 정리 글 [java] replace()와 replaceAll()의 차이점replace()와 r..