“Unmappable character for encoding UTF-8” error

后端 未结 10 829
失恋的感觉
失恋的感觉 2020-11-27 03:21

I\'m getting a compile error at the following method.

public static boolean isValidPasswd(String passwd) {
    String reg = \"^(?=.*[0-9])(?=.*[a-z])(?=.*[A-         


        
10条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-27 03:42

    In eclipse try to go to file properties (Alt+Enter) and change the Resource → 'Text File encoding' → Other to UTF-8. Reopen the file and check there will be junk character somewhere in the string/file. Remove it. Save the file.

    Change the encoding Resource → 'Text File encoding' back to Default.

    Compile and deploy the code.

提交回复
热议问题