I posted to
Java in General (beginner). My post was today's and entitled "Why Won't This Compile?".
I received a few replies but none that solve my problem. Both MyTest.java and MyClass.java are in my c:\java directory from where I compile them. I want MyTest.java and MyClass.java to be in different packages. That's why I have a package statement at the top of MyClass.java. I want to call method MyFunc (in MyClass.java) from method main in MyTest.java.
By importing com.util.*; (with MyClass.class in c:\java\com\util) shouldn't MyTest.java recognize MyFunc? After successfully compiling MyClass.java, I copied MyClass.class to c:\java\com\util. Isn't this required to make my import statement work, so MyTest.java can access the byte of MyFunc from c:\java\com\util?
I'm sure the solution is easy. But for a beginner like me it's not. Thanks!