is that any good ideas to fixed the aligment of the output instead of using \t, due to some of the output words have more or less. :)

but i can return method to display it? like use %.2f in C. :)
but i using using return method to display the output

public String toString(){
    	return "\t" + getFlavors() + "\t\t" + getWeight() + "\t\t\t" + getPrice() + "\t\t\t\t" + getQuantity() + "\t\t\t\t" + getPrice() * getQuantity();
    }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.