Kevin Kroll wrote:well ive no idea whats missing, you could tell me that as im a beginner and ive no idea why this doesnt work
That is just some snippet of code at the front of the book, it's not supposed to be complete. Forget that code and move on. You are not supposed to understand AWT until you get to that section of the book.
Concentrate on grasping the concept that the authors are trying to put through. Leave the specific packages / classes / APIs for later. Those are for later. For now, make sure you understand the following through and through(in order):
a) Declarations, Access Control
b) Object oriented paradigm (what is encapsulation of data, abstraction, inheritance etc )
Lots of people ask this question and get confused about the Party class.
Ignore the Party example. It is incomplete. It is simply there to show you what a class looks like. Keep going with the rest of the book.
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop