IT/Issue
Exception in thread "main" java.util.regex.PatternSyntaxException : Dangling meta character '*
Source private static String countSpaceComment(String string) { String[] tests = string.split("*/"); return tests[0]; } Error Exception in thread "main" java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0 Cause · Split 할때 특수문자 구분을 해주는 \\가 없어서 생기는 현상 How · String[] tests = string.split("\\*/"); 로 변경하여 해결 private static String countSpaceComment(String string) { String[..
2023. 4. 17. 10:48