강의

멘토링

로드맵

Inflearn Community Q&A

minsoo2091416's profile image
minsoo2091416

asked

Introduction to Java Algorithm Problem Solving: Coding Test Preparation

3. Words in a Sentence (indexOf(), substring())

마지막단어 따로 처리대신 처음부터 공백문자를 추가해도 될까요?

Written on

·

171

0

안녕하세요, 선생님. 강의 잘 듣고 있습니다. 이 문제에서 마지막 단어검사를 따로 해주는 대신 처음부터 공백문자를 하나 추가해주면 조금 간단해질것 같은데 괜찮을까요? 이렇게요.  str += " ";

java코테 준비 같이 해요!

Answer 1

0

codingcamp님의 프로필 이미지
codingcamp
Instructor

안녕하세요^^

네. 좋은 방법입니다.

minsoo2091416's profile image
minsoo2091416

asked

Ask a question