Question: I understand basic idea of equal method in java but in this question i only know i should write false inside else{ }. Could anyone
I understand basic idea of equal method in java but in this question i only know i should write false inside else{ }. Could anyone help me solve this question. i am really appreciated.
1) Writing/understanding an equals method. a Complete the equals method in the following class. Two Palette objects are equal if they have the same name and their arrays, colors, have the same elements in the same order. public class Palette private Color colors private String name; public Palette (Color c, string n) colors F c name ni public boolean equals (object obj) if (obj instanceof Palette) Write your code here else
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
