Interface Syntax

   

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
     



    Java 2 Primer Plus
    Java 2 Primer Plus
    ISBN: 0672324156
    EAN: 2147483647
    Year: 2001
    Pages: 332

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net