/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		SomeObject obj1 = new SomeObject(1, "Lorem ipsum");
		SomeObject obj2 = (SomeObject) obj1.clone();
		
		System.out.println("Object 1: " + obj1);
		System.out.println("Object 2: " + obj2);
		
		System.out.println("São iguais? " + obj1.equals(obj2));
	}
}

class SomeObject  implements Cloneable{

	private int identifier;
	private String someDescription;
	
	public SomeObject() {
		
	}
	
	@Override
	protected Object clone() throws CloneNotSupportedException {
		// TODO Auto-generated method stub
		return super.clone();
	}
	

	public SomeObject(int identifier, String someDescription) {
		super();
		this.identifier = identifier;
		this.someDescription = someDescription;
	}



	public int getIdentifier() {
		return identifier;
	}

	public void setIdentifier(int identifier) {
		this.identifier = identifier;
	}

	public String getSomeDescription() {
		return someDescription;
	}

	public void setSomeDescription(String someDescription) {
		this.someDescription = someDescription;
	}
	
	@Override
	public String toString() {
		return "[" + this.identifier + " - " + this.someDescription + "]";
	}

}
