Исключение в потоке «основной» java.lang.NoSuchMethodError!!1JAVA

Программисты JAVA общаются здесь
Гость
Исключение в потоке «основной» java.lang.NoSuchMethodError!!1

Сообщение Гость »

Код: Выделить всё

   package OOPS.constructors;

class Student{
String name;
int age;

public void printInfo(){
System.out.println(this.name);
System.out.println(this.age);
};

Student(String name,int age){
this.name = name;
this.age = age;
}
}

public class Parameterized{
public static void main(String[] args) {
Student s2 = new Student("yash", 21);
s2.printInfo();
}
}
здесь ошибка:
Исключение в потоке «main» java.lang.NoSuchMethodError: OOPS.constructors.Student.(Ljava/lang/String;I)V
at OOPS.constructors.Parameterized.main(Parameterized.java:20)
Я не знаю, как устранить эту ошибку, поэтому кто угодно может мне помочь

Подробнее здесь: https://stackoverflow.com/questions/781 ... thoderror1

Вернуться в «JAVA»