Fire Monk
New Coder
[CODE highlight="19"]import java.util.*;
public class doodle {
public static void main(String[] args) {
// Complete your code here
Student s1= new Student;
String n = "Ankit";
s1.Student(n); //This is creating the problem. Compiler can't understand what is Student.
}
}
class Student {
public String name;
public Student(String n){
name = n;
}
}[/CODE]
public class doodle {
public static void main(String[] args) {
// Complete your code here
Student s1= new Student;
String n = "Ankit";
s1.Student(n); //This is creating the problem. Compiler can't understand what is Student.
}
}
class Student {
public String name;
public Student(String n){
name = n;
}
}[/CODE]
Last edited: