import java.util.*;
class Student2{
String name;
int age;
public void printInfo(){
System.out.println(this.name);
System.out.println(this.age);
}
Student2(String name, int age){
this.name = name; //this.name here name is name of object of class Student
this.age = age; // and name is parameter which is passed;
}
}
public class OOPS2{
public static void main(String args[]){
Student2 s1 = new Student2("Sud",24); //This is a Constructor:- to construct object
s1.printInfo();
}
}