How to remove error and make method work properly?
Error: cannot find symbol test.say();
symbol: method say()
class Untitled {
public void main(String[] args) {
Student test = new Student();
test.say();
}
public class Student {
public String name = "John";
public String studentindex = "23";
public String group = "11c";
}
public void say () {
Student stud = new Student();
System.out.println (stud.name);
System.out.println (stud.studentindex);
System.out.println (stud.group);
}
}
Thank you