摘要: 一、构造方法 如果类提供了一个自定义的构造方法,将导致系统不再提供默认构造方法。代码如下: public class Test { public static void main(String[] args) { Foo obj1=new Foo(); } } class Foo { int val 阅读全文
posted @ 2020-10-08 17:01 IQcarry 阅读(202) 评论(0) 推荐(0)
摘要: 仔细观察如下示例代码: // MethodOverload.java // Using overloaded methods public class MethodOverload { public static void main(String[] args) { System.out.print 阅读全文
posted @ 2020-10-08 16:38 IQcarry 阅读(172) 评论(0) 推荐(0)