/**
* Example 1: Class Student
*/
public class Student
{
// Attributes
private String name;
private String sid;
// Methods
// Constructor
public Student(String newName, String newSid)
{
name = newName;
sid = newSid;
}
// Set and get methods for each of the attributes
public String getName()
{
return name;
}
public String getSid()
{
return sid;
}
public void setName(String newName)
{
name = newName;
}
public void setSid(String newSid)
{
sid = newSid;
}
}
public class TestStudent
{
public static void main(String args[])
{
Student s1;
Student s2;
s1 = new Student(args[0],"12345");
s2 = new Student(args[1],"12345");
System.out.println("The name of the student s1 is "+s1.getName());
System.out.println("The name of the student s2 is "+s2.getName());
}
}