Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Packages, Classes, Scope

 
Joe Lank
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've run into a little Object-Oriented-Programming trouble.

It began when I found myself unable to utilize packages(Multiple .class files in the same directory could not see each other, when package xxx; was put on top of each of them). Could somebody point me to a step-by-step package tutorial? I 'searched' the forums a while ago but didn't find something along those lines.

Then, despite my best efforts, there was trouble having my classes communicate properly(Calling each others' methods, passing arguments/parameters back and forth). So I just plopped everything into the now-mish-mash'ed public class.
 
Jeff Pavlocak
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Joe,

There may be a decent online tutorial for this, but in case you're interested, in the book "Head First Java" by Kathy Sierra and Bert Bates, they have a real good explanation of packages.

good luck,

Jeff
 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about posting your codes here & let us see what could be wrong? And yes, HF Java should be able to get you into shape with all those stuffs.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic