if (aName.equals(anotherName))
{
System.out.println(aName + " equals " + anotherName);
}
else
{
System.out.println(aName + " does not equal " +anotherName );
}