Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {

    public static boolean isChinese(String path) {
        char[] charArray = path.toCharArray();
        int len = charArray.length;
        for (int i = 0; i < len; i++) {
            /*if ((charArray[i] >= 0x4e00) & (charArray[i] <= 0x9fbb)) {
               return true;
            }*/
            if (java.lang.Character.toString(charArray[i]).matches("[\\u4E00-\\u9FA5]+")) {
                return true;
            }
        }
        return false;
    }
}