So I'm printing an object's name from an arrayList, and it results in printing stuff like "Tacos@5fefccfd". Could you please help me remove this?
I've tried toString()
but the problem persists.
System.out.println("Customer#" + orderNum + ": " + table.food.get(choice).toString());
System.out.println("");
for (int j = 0; j < table.food.size(); j++)
{
System.out.print("(" + (j+1) + ")" + table.food.get(j) + " ");
}
System.out.println("");
This code prints "(1)Burger@1d020199 (2)Fries@30eb6038 (3)Tacos@5fefccfd (4)Nuggets@13826e98"