object对象
public final native Class> getClass(); 调用其他语言得到类对象。
public native int hashCode(); 调用其他语言得到hashcode
public boolean equals(Object obj) {
return (this == obj);
} //通用equals方法
protected native Object clone() throws CloneNotSupportedException; //调用其他语言克隆对象
public String toString() {
return getClass().getName() + "@" + Integer.toHexString(hashCode());
} //对象转字符串
public final native void notify(); //唤醒
public final native void notifyAll(); //唤醒所有
public final native void wait(long timeout) throws InterruptedException;//等待
public final void wait(long timeout, int nanos) throws InterruptedException {
if (timeout < 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 && timeout == 0)) {
timeout++;
}
wait(timeout);
} //等待
public final void wait() throws InterruptedException {
wait(0);
} //等待
protected void finalize() throws Throwable { } //垃圾回收
String对象
public int length() //长度
public boolean isEmpty() //是否为空
public char charAt(int index) //返回固定位置字符
public int codePointAt(int index) //传入字符的index,返回字符串中对应字符的ascll
public int codePointBefore(int index) //传入字符的index,返回字符串中对应字符前一个的ascll
public int codePointCount(int beginIndex, int endIndex) //asscall码式长度,通常跟length相同
void getChars(char dst[], int dstBegin) //指定区间的char[]
public byte[] getBytes(String charsetName) //转byte【】
equals //比较方法
public boolean contentEquals(CharSequence cs) //包含等于
equalsIgnoreCase //比较不区分大小写
public int compareTo(String anotherString) //比较返回位置
startsWith()
endsWith()
hashCode()
indexOf()
lastIndexOf()
substring()
subSequence()
concat()
replace()
matches()
contains()
replaceFirst()
replaceAll()
split()
toLowerCase()
toUpperCase()
trim()
toString()
toCharArray()
format()
valueOf()
copyValueOf()
好好学习,天天复习。