[Java]서울에서 김서방 찾기
by Roel Downey728x90
반응형
서울에서 김서방 찾기
문제
풀이
class Solution { public String solution(String[] seoul) { int answer = 0; for (int index =0 ; index<seoul.length; index++) { if (seoul[index].equals("Kim")) { answer = index; break; } } return "김서방은 " + answer+ "에 있다"; } }
728x90
반응형
블로그의 정보
What doing?
Roel Downey활동하기
What doing?Roel Downey 님의 블로그입니다.