Java (501) 썸네일형 리스트형 [JAVA] 프로그래머스 - 문자열 바꿔서 찾기 https://school.programmers.co.kr/learn/courses/30/lessons/181864 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 정답 class Solution { public int solution(String myString, String pat) { int answer = 0; int sublen = pat.length(); String newString =""; for(int i=0; i [JAVA] 프로그래머스 - 간단한 식 계산하기 https://school.programmers.co.kr/learn/courses/30/lessons/181865 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 정답 class Solution { public int solution(String binomial) { int answer = 0; if(binomial.contains("+")) { String temp[] = binomial.split("\\+"); answer = Integer.parseInt(temp[0].trim()) + Integer.parseInt(temp[1].trim()); }.. [JAVA] 프로그래머스 - 문자열 잘라서 정렬하기 https://school.programmers.co.kr/learn/courses/30/lessons/181866 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 정답 import java.util.ArrayList; import java.util.Collections; class Solution { public String[] solution(String myString) { ArrayList list = new ArrayList(); myString = myString.replace("x"," "); String temp[] = myString.spl.. [JAVA] 프로그래머스 - x 사이의 개수 https://school.programmers.co.kr/learn/courses/30/lessons/181867 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 정답 class Solution { public int[] solution(String myString) { String result[] = myString.split("x"); int answer1[] = new int[result.length]; int answer2[] = new int[result.length+1]; if(myString.endsWith("x")) { for(int i=0.. [JAVA] 프로그래머스 - 공백으로 구분하기 2 https://school.programmers.co.kr/learn/courses/30/lessons/181868 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 문자열 공백 제거 https://codechacha.com/ko/java-remove-whitespace/#:~:text=Java%20-%20%EB%AC%B8%EC%9E%90%EC%97%B4%20%EA%B3%B5%EB%B0%B1%EC%A0%9C%EA%B1%B0%20%28trim%2C%20replace%29%201%201.,%EC%88%98%20%EC%9E%88%EC%8A%B5%EB%8B%88%E.. [JAVA] 프로그래머스 - 공백으로 구분하기 1 https://school.programmers.co.kr/learn/courses/30/lessons/181869 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 문자열 자르기, 분리하기 Java - 문자열 자르기, 분리하기(split, substring) (codechacha.com) Java - 문자열 자르기, 분리하기(split, substring) String.split(), String.substring()으로 문자열을 자를 수 있습니다. 또한 Commons-io 라이브러리를 이용하여 문자열을 자를 수 있습니다. split은 정규표현식을 인자로 .. [JAVA] 프로그래머스 - ad 제거하기 https://school.programmers.co.kr/learn/courses/30/lessons/181870 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 정답 import java.util.ArrayList; class Solution { public String[] solution(String[] strArr) { ArrayList list = new ArrayList(); for(int i=0; i [JAVA] 프로그래머스 - 문자열이 몇 번 등장하는지 세기 https://school.programmers.co.kr/learn/courses/30/lessons/181871 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 정답 class Solution { public int solution(String myString, String pat) { int sublen = pat.length(); int count = 0; for(int i=0; i 이전 1 ··· 29 30 31 32 33 34 35 ··· 63 다음