aspose file tools*
The moose likes Beginning Java and the fly likes method... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "method..." Watch "method..." New topic
Author

method...

Brandi Love
Ranch Hand

Joined: Sep 19, 2003
Posts: 133
can you call another method within a submethod of a program?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

There's no such thing as a "submethod." A method is a method, and generally, yes, methods can call other methods. There are some specific caveats to do with access control, static vs. member methods, etc, but you can learn about those when you bump into them (which may be very soon.)


[Jess in Action][AskingGoodQuestions]
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
I'm a little confused about what you mean by "submethod", could you please clarify?
In general though, any class can call any public method of any other class. A class can also call protected methods of any other class that it extends. Private methods may be called by other methods of the same class. Methods without any visibility modifier in a class may be called by any other class that extends it, as well as other classes in the same package.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: method...