Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

method...

 
Brandi Love
Ranch Hand
Posts: 133
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you call another method within a submethod of a program?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
Jason Menard
Sheriff
Posts: 6450
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic