本人英语水平有限,有不准确的地方,欢迎在回复指出,谢谢。
1. The function of hashcode()
Usually we use equals() to compare 2 objects if they are equal with our own rules. Refer to java's tradition, if you override equals() you must override hashCode().
The rule of compare 2 objects:
1. Compare hashCode of 2 objects
If not equal, thus objects not equal. Finish.
If they are equal, goto setp 2.
2. Compare 2 objects' equals operation.
If they are equal, thus 2 objects equal.
over.
2 . Difference between readonly and disable of text area in HTML?
readonly : Submit forms.
disable: Do not submit forms.
3. Methods of Object class.
public native int hashCode();
public boolean equals(Object obj)
protected native Object clone() throws CloneNotSupportedException;
public String toString()
public final native void notify();
public final native void notifyAll();
public final native void wait(long timeout) throws InterruptedException;
protected void finalize() throws Throwable { }
public final native Class> getClass();
4. hashtable and hashmap
public class Hashtable<K,V>
extends Dictionary<K,V> implements Map<K,V>, Cloneable, Serializable
Not null. Not repeated. Synchronized.
Call rehash() when above length*0.75, length = oldlength * 2 + 1;
public class HashMap<K,V>
extends AbstractMap<K,V> implements Map<K,V>, Cloneable, Serializable
Coulde be null. Not repeated. Not synchronized.
5. JSP built-in objects
1) Request
Request belongs to HttpServletRequest. It contains request infomation about web browser. And it provide some useful method to get data from cookie,header,session.The request of the client information is encapsulated in the request object, through which customers can understand, and then respond.
2) Response
Response belongs to HttpServletResponse. It Will mainly deal with the results of the JSP container back to the client.