본문 바로가기
Beakjoon&프로그래머스/Java

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

by 현장 2025. 2. 16.

-Code

class Solution {
    public int solution(String str1, String str2) {
        return str1.contains(str2) ? 1 : 2;
    }
}