File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Packages, Classes, Scope Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Packages, Classes, Scope" Watch "Packages, Classes, Scope" New topic
Author

Packages, Classes, Scope

Joe Lank
Greenhorn

Joined: Jun 08, 2004
Posts: 9
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

Joined: Apr 26, 2004
Posts: 16
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

Joined: Apr 02, 2004
Posts: 884
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.


SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
http://java.sun.com/docs/books/tutorial/java/interpack/packages.html


Tony Morris
Java Q&A (FAQ, Trivia)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Packages, Classes, Scope
 
Similar Threads
using package name starting with java or javax
compiling interdependent classes and packages
compiling interdependent classes and pachages
sun.tools.javac.Main has been deprecated.
Project directory structure that facilitates all kinds of developer testing