Computer Science Canada Multiple Classes |
Author: | eNc [ Wed Oct 12, 2005 2:04 pm ] |
Post subject: | Multiple Classes |
How can I have 2 files, 1 with a class containing my main method, and then the other with an object class, and then using my main method file to create a new object which is defined in the other file. |
Author: | wtd [ Wed Oct 12, 2005 4:05 pm ] | ||||
Post subject: | |||||
An example. In "Foo.java":
And in "Main.java":
As long as both are in the same directory, that just works. |
Author: | eNc [ Wed Oct 12, 2005 6:22 pm ] |
Post subject: | |
thanks wtd, i just wasn't sure if you could do that. |