Nazar Buko wrote:Right, i completely forgot about this. The program works properly now.
Just to clarify, in Java "==" means true equality, where as "=" is simply assignment?
Yes.
As for "==", it is mostly used to
test equality between primitive types (e.g. int, char). equals() is used when testing the equality of objects (e.g. Strings and mostly everything). When used between objects, "==" only returns true if the left and right refer to the exact same object. The following would print false then true: