很多次见到同事使用这个方法,同时看到https://blog.csdn.net/qq_27298687/article/details/68921934这位仁兄写的非常仔细,我也记录一下,好加深印象. 这个是从java5的时候添加进去的方法. /** * Returns a formatted string using the specified format string and * arguments. * * <p> The locale always used is the one r…
Java中的Object类是所有类的父类,它提供了以下11个方法: public final native Class<?> getClass() public native int hashCode() public boolean equals(Object obj) protected native Object clone() throws CloneNotSupportedException public String toString() public final native v…