面试总结(英文版,不断更新中。。。)

本人英语水平有限,有不准确的地方,欢迎在回复指出,谢谢。


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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值