hi all, Remeber the main class name should be the same as the file name. if they belong to the same package, you could simply use instances to play around the classes...
much better if you could paste the errrors that you getting when you compile.. On Sat, Jan 2, 2010 at 9:06 AM, Nishant <[email protected]> wrote: > hi all, > u guise first save the program as class name in which the main method exist > if all the classes are in the same file. > and make inherited class/one class not public and then > compile.................. > Nishant > > > On Sat, Jan 2, 2010 at 8:18 AM, JKid314159 <[email protected]> wrote: > >> Hi: >> >> I am compiling the following: >> >> javac MyFirstApp.txt >> >> I receive the following message? >> >> error: Class names, 'MyFirstApp.txt',are only accepted if >> annotation processing is explicitly requested. >> >> I tried to save the file as MyFirstApp.java and then compiled >> javac MyFirstApp.java >> >> This produced a number of compiler errors. >> >> Then I had two public class plus another class with main. The >> compiler messaged the two other public classes should be in a separate >> file but I was unsure how to import them to the class file with the >> main class. >> >> Any suggestions on this. >> >> Thank you. >> >> -- >> To post to this group, send email to >> [email protected] >> To unsubscribe from this group, send email to >> [email protected]<javaprogrammingwithpassion%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/javaprogrammingwithpassion?hl=en > > > -- > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected]<javaprogrammingwithpassion%[email protected]> > For more options, visit this group at > http://groups.google.com/group/javaprogrammingwithpassion?hl=en > -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en
