I'm trying to compile my class files. I have two classes. when I compile them i get the following error:
c:\java\test\src>javac MyTest.java
MyTest.java:6: cannot resolve symbol
symbol : variable
Test location : class MyTest
String t = Test.gethelp();
^
1 error
Here is my code:
public class Test
{
public String gethelp()
{
String test = "time";
return test;
}
}
public class MyTest
{
public static void main(String[] args)
{
String t = Test.gethelp();
System.out.println("THe
word is " + t);
}
}