Hey, I am having a problem getting a test to run correctly. Basically my equals method doesnt work when it is called if the name and the code variable are equal. I.E. the if statement doesnt work correctly.
Here is the code...
public class Denomination { private String name; private String code; public static void main(String[] args) { } public Denomination(String n, String c) { name = c; code = n; } public String getName() { return name; } public String getCode() { return code; } public boolean equality(Denomination a, Denomination b) { boolean equals = false; if(a.getName().equals(b.getName()) && a.getCode().equals(b.getCode())) { equals = true; } return equals; } }