Saturday, 17 August 2013

java method in seperate class file giving no symbol error

java method in seperate class file giving no symbol error

This is annoying me but I have set up a class in a second file which is in
the same package as the main but for some reason i am unable to call it
without it giving a "cannot find symbol error" even though I'm sure
everything is ok. This is a basic file I tried and it replicated exactly
the same but im not sure if its my code or netbeans.
package filesystem;
public class FileSystem {
public static void main(String[] args) {
FileMethods(Hello);
}
}
and the other class
package filesystem;
public class FileMethods {
public void FileMethods(String myString){
System.out.println(myString);
}
}
This is the error i get next to the line
!
thanks for any help

No comments:

Post a Comment