Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 379 Bytes

File metadata and controls

17 lines (12 loc) · 379 Bytes

프로그래머스 Level1 : 연습문제 문자열 다루기 기본

import java.util.regex.Pattern;

class Solution {
    public boolean solution(String s) {
        boolean answer = true;
        
        answer = s.matches("\\d{4}") || s.matches("\\d{6}");
    
        return answer;
    }
}