This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javaidentifier

 
ojak dev
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can a function can be accessed in a class from another class that has no main function
 
Adam Altmann
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic