Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Muaz Bashara   on Oct 07 In Java Category.

  
Question Answered By: Aaleyah Khan   on Oct 07

Sorry, this doesn't make sense to me. A private  method can quite happily access
public classes and their public members.

It is the reverse which is true - a private method cannot be accessed by other
classes (only from within its own class).

This makes "main" inaccessible outside "Test" and therefore in theory
inaccessible to the run-time environment (although I can imagine some run-time
environments not bothering to check for this).

Share: 

 

This Question has 9 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on private static void main Or get search suggestion and latest updates.


Tagged: