I encountered some problem with the classpath in
Java. I am a really beginner in this language, so please use less jargon...
I create two classes in two different .java files
These are the classes:
Welcome.java
------------
class Welcome {
public static void main (
String[] args ) {
printWelcome();
}
public static void printWelcome () {
System.out.println("Welcome to Java");
}
}
Now, next class in different file need to access the Welcome class
AccessWelcome.java
-----------------
class AccessWelcome {
public static void main ( String[] args ) {
Welcome well = new Welcome();
well.printWelcome();
}
}
I tried to compile the AccessWelcome.java using javac AccessWelcome.java, but there is this message about classpath...
What i am trying to do is to use AccessWelcome class to call a method in Welcome class..
Thank you in advance for your kind explanation!!!