
public class Student implements Cloneable{

	private String name;
	private int id;
	private static int n=0;



	public Student(String name) {

		this.name = name;
		this.id = ++n;
	}

	public String getName() {
		return name;
	}



	public void setName(String name) {
		this.name = name;
	}

	public int getId() {
		return id;
	}


	@Override
	public String toString() {
		return "Student [name=" + name + ", id=" + id + "]";
	}
	
	public Student clone() throws CloneNotSupportedException{
		Student a = (Student)super.clone();
		return a;
	}



}
