[10:57 AM] Sandhya Singh
class Student
{
String name;
Student() // default constructor
{
}
Student (String name) // Parameterized Constructor
{
this.name =name;// this refer the current instance class member
}
void display()
{
System.out.println("Name"+name);
}
}
class Main
{
public static void main()
{
Student stud =new Student(); //calling default constructor
Student stud =new Student("Mac"); // calling Parameterized constructor
}
}