[프로그래머스]문자열 안에 문자열

박예림·2023년 3월 6일
0

코테

목록 보기
42/132

class Solution {
    public int solution(String str1, String str2) {
        int answer = 2;
        if (str1.contains(str2) == true) {
            answer = 1;
        }
        
        return answer;
    }
}
profile
응애 나 아기개발자

0개의 댓글