简体   繁体   中英

In the reskinned Java SE 8 docs, what is the difference between concrete and instance methods?

New tabs have been added to the method summary. "Concrete" and "instance" suggest more or less the same thing to me. What is the difference?

Java SE 7 : Java SE 7 截图

Java SE 8 : Java SE 8 截图

  • A concrete method is a method that's not abstract.

  • An instance method is a method that's not static.

(Therefore, all static methods are concrete methods but are not instance methods.)

简而言之:具体 - 静态 = 实例

在我看来,具体方法包括静态方法,而实例方法不包括。

Static        Abstract        All Other
InstanceM   N               Y              Y
ConcreteM   Y               N              Y
All         Y               Y              Y

All Methods

  • Concrete Methods (Not Abstract Methods)
    • Static Methods
    • Instance Methods
  • Abstract Methods

具体方法意味着实例方法+静态方法(但不是抽象方法)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM