API: Thread - String

Thread 

public static void sleep(long millis, int nanos)
    throws InterruptedException {
        if (millis < 0) {
            throw new IllegalArgumentException("timeout value is negative");
        }

        if (nanos < 0 || nanos > 999999) {
            throw new IllegalArgumentException(
                                "nanosecond timeout value out of range");
        }

        if (nanos >= 500000 || (nanos != 0 && millis == 0)) {
            millis++;
        }

        sleep(millis);
    }
public static native void sleep(long millis) throws InterruptedException;

String 

public final class String
    implements java.io.Serializable, Comparable<String>, CharSequence
public String(byte bytes[]) {
        this(bytes, 0, bytes.length);
    }
public byte[] getBytes() {
return StringCoding.encode(value, 0, value.length);
}

猜你喜欢

转载自www.cnblogs.com/hoper2020/p/12744454.html
今日推荐