|
Ok I'll try to answer this, but I offer a disclaimer that my Java skills are still at a beginner level myself! Basically you will be able to run the class without any problems. If, however, you decide to use that class and it's main method by using it in a subclass you will not be able to use the method or any of it's variables. Have a look at http://java.sun.com/docs/books/tutorial/java/javaOO/methoddecl.html for a much better explanation. Al -----Original Message----- From: owner-java400-l@midrange.com [mailto:owner-java400-l@midrange.com]On Behalf Of Bharat Hastimalji Jain Sent: Thursday, November 09, 2000 6:07 AM To: JAVA400-L@midrange.com Subject: Main Method Hi To All Java Pundits here, I am a new disciple to the Java and this board...Just a week old. I read that the Main method should always be Public in a class as it is ths entry point, and hence should be accessible to all. But I made the main method private, it did compile and also execution took place.... My Question is how does it happen..... Thanks Bharat +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +--- ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.