摘要:
1.Distinguishing overloaded methodsIf the methods have the same name, how can Java know which method you mean?There is a simple rule: Each overloaded method must take a unique list of argument types.2.Overloading on return valuesIt is common to wander,"Why only class names and methods arguments 阅读全文
posted @ 2013-01-16 16:37
siyusiying
阅读(103)
评论(0)
推荐(0)
摘要:
The relational operators == and != also work with all objects,but their meaning often cunfuses the first-time java programmer.Here's an example:public class Equivalence { public static void main (Sting[] args){ Integer n1 = new Integer(47); Integer n2 = new Integer(47); System.out.println(n1 == 阅读全文
posted @ 2013-01-16 11:21
siyusiying
阅读(156)
评论(0)
推荐(0)
浙公网安备 33010602011771号