Java 2 Primer Plus

   

Java™ 2 Primer Plus

By Steven Haines, Steve Potts

Table of Contents
Chapter 8.  Interfaces

The general syntax for defining interfaces is as follows:

[public] interface iname [extends i2name]

  • Can include the keyword abstract, but it is implied

  • Can include the keyword public, but it is implied

  • Can include static and final for fields, but they are implied

All interfaces are public and abstract and if they contain any attributes, those attributes are static and final.


       
    Top
     

    Категории