What will be the output of the following program?
class OutPut
{
public static void main(String arg[])
{
Student narayan = new Student("Narayan", 72, 'A');
Student mahesh = new Student("Mahesh", 98, 'C');
Student kiran = new Student(null, 0, '0');
kiran.print();
narayan.print();
mahesh.print();
}
}
class Student
{
String name;
int marks;
char section;
Student(String name, int marks, char section)
{
this.name = name;
this.marks = marks;
this.section = section;
}
void print()
{
System.out.println("Name = " + name + ", section = " + section + ", marks = " + marks);
}
}