Skip to content

Instantly share code, notes, and snippets.

@gurkanoluc
Created April 6, 2011 17:18
Show Gist options
  • Save gurkanoluc/906079 to your computer and use it in GitHub Desktop.
Save gurkanoluc/906079 to your computer and use it in GitHub Desktop.
public class Car implements Cloneable {
public String name;
public Car() {
// TODO Auto-generated constructor stub
}
public Car(String name)
{
this.name = name;
}
public void write()
{
System.out.println(this.name);
}
@Override
public Object clone() throws CloneNotSupportedException {
// TODO Auto-generated method stub
return super.clone();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment