Calling methods in other files
I am taking a beginning java class based in a unix environment. I have to create three .java files. One that prints out a simple line of text, one to call the method that prints the line of text and another file that contains the Main that calls the 2nd file. I have tried this a number of different ways to no avail so I am hoping someone can point me in the right direction.
Thanks in advance and sorry if the above explanation is hard to understand.
Re: Calling methods in other files
I think thats where everyone has lost you. But this is what I've made of your question:
and another file that contains the Main that calls the 2nd file.
You have three tasks (each in a separate class/java file)
1. Make a class that prints a line of text
2. Make a second class to call the method from the first class that prints a line of text
3. Make a third class with a Main method (for command line) that calls the method in the second class (which calls the method in the first class to print the line of text)
And you've done the first and second class and you're having a problem with the third class?