File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes javaidentifier Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "javaidentifier" Watch "javaidentifier" New topic


ojak dev

Joined: Feb 11, 2004
Posts: 1
can a function can be accessed in a class from another class that has no main function
Adam Altmann

Joined: Nov 15, 2003
Posts: 21
As far as I know, there's only ever one main method.
Yes, you can access functions in one class from another class. It just depends on which access modifiers (Public, Protected, Private, (Default)) are in place.

SCJP 1.4
I agree. Here's the link:
subject: javaidentifier
It's not a secret anymore!