摘要:
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 阅读全文
摘要:
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 == 阅读全文