• Post Reply Bookmark Topic Watch Topic
  • New Topic

Head first Java (The Book)  RSS feed

 
Kevin Kroll
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well i got this book since a few days as i wanted to learn java, reading through first sides... oh snap first programm

sooo after alot of using the javac command finally the code looks like this:


the book shows you a window should pop up but it doesnt pop up
Im useing JDK1.7 and Windows7
 
Mack Wilmot
Ranch Hand
Posts: 88
Linux Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That code is incomplete. hehe
 
Kevin Kroll
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well ive no idea whats missing, you could tell me that as im a beginner and ive no idea why this doesnt work
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need to set the frame visible
you'll also need a window listener to close the frame/program
and you also need to do a lot more add(..)ing

 
Mack Wilmot
Ranch Hand
Posts: 88
Linux Netbeans IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mansukhdeep Thind
Ranch Hand
Posts: 1163
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 )

c) Flow Control(for loop, do while loop)

d) Exception handling in Java

e) Method overloading & overriding.

f) String & Object classes

g) Collection Framework



 
Campbell Ritchie
Marshal
Posts: 55761
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!