Interfaces | Building Blocks Java (original) (raw)
Like we said, Java source is really just classes. Import statements are shorthand for many different classes; and comments aren’t really there (as far as the compiler is concerned) in the first place. However there is one thing in Java source code that is neither a class nor a member of a class. That’s an interface. We’re not going to say much about interfaces yet since that’s a subject for a more advanced chapter. However we will note that an interface defines methods that a class implements. In other words it declares what certain classes do. However an interface itself does nothing. All the action at least, happens inside classes.
This entry was posted on Wednesday, July 29th, 2009 at 9:36 am and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.