Filename and Class name
4 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ramesh_Naguboina
Posted On:   Wednesday, June 6, 2001 09:03 AM

Why public class and file name of Java program must be same?

Re: Filename and Class name

Posted By:   Sandip_Chitale  
Posted On:   Saturday, June 9, 2001 10:24 PM

See -


http://www.jguru.com/forums/view.jsp?EID=400420

Re: Filename and Class name

Posted By:   elango_maragtham  
Posted On:   Thursday, June 7, 2001 06:49 PM

Hi ..
For any interpreter to run the program first searches for the main method . But java is a pure OO language so the main method is kept inside a class only by refering to the file name u can run the program also only we can call Classes static methods by prefixing it with class . So i think both shold have matching name otherwise it could not be achieved ..

I Hope this would be correct

Re: Filename and Class name

Posted By:   Anonymous  
Posted On:   Wednesday, June 6, 2001 11:28 PM

Hi,

I guess, it has something to do with packages in Java.

Re: Filename and Class name

Posted By:   Luigi_Viggiano  
Posted On:   Wednesday, June 6, 2001 09:47 AM

because people is already untidy enough ;-)
About | Sitemap | Contact