abstract interface和interface的區別嗎?
interface 本身就是abstract的,只不過沒有明確的規定出來,說一定要把abstract這個關鍵字寫上。所以abstract interface 就是interface,兩者根本沒有區別。
在《java in a nutshell》里,
“All methods of an interface are implicitly abstract, even if the abstract modifier is omitted. ”
在《thinking in java》里,
“ the abstract keyword, which allows you to create one or more methods in a class that have no definitions
—you provide part of the interface without providing a corresponding implementation, which is created by inheritors.
The interface keyword produces a completely abstract class, one that provides no implementation at all.”
所以結論就是 abstract interface 就是interface,兩者根本沒有區別。
posted on 2008-03-21 17:29 gembin 閱讀(2193) 評論(2) 編輯 收藏 所屬分類: JavaSE