chapter1introductiontojava.pptVIP

  • 7
  • 0
  • 约1.45万字
  • 约 45页
  • 2016-10-06 发布于天津
  • 举报
chapter1introductiontojava

* * Shallow vs. Deep Copy House house1 = new House(1, 1750.50); House house2 = (House)house1.clone(); Shallow Copy * * Shallow vs. Deep Copy House house1 = new House(1, 1750.50); House house2 = (House)house1.clone(); Deep Copy * * Interfaces vs. Abstract Classes In an interface, the data must be constants; an abstract class can have all types of data. Each method in an interface has only a signature without implementation; an abstract class can have concrete methods. * * Interfaces vs. Abstract Classes, cont. Suppose that c is an instance of Class2. c is also an instance of Object, Class1, Int

文档评论(0)

1亿VIP精品文档

相关文档