The idea is to set different values from one class to another using the interface.
My code:
public Make(String name, int foundingYear, String founder) {
this.name = name;
this.foundingYear = foundingYear;
this.founder = founder;
}
//other code
So I want to set those values in another class like this:
public record anotherClass (String name, String color, int hp) {
Make make = new Make();
Set<Make> makes = new HashSet<>();
makes.add("name", 1995, "founder");
The thing is when I'm trying to add values (makes.add("name", 1995, "founder");) I can't do that, because it expects just one argument to be added of type makes. What I'm I doing wrong?