Assume that you have already successfully written a class named Students that handles student records for the Registrar’s office. Assume that the Students class:
• Contains a
studentIdsinstance variable—an array ofintsthat contains student ID numbers.• Contains a 1-parameter constructor that initializes the
studentIdsinstance variable.• Contains this
mainmethod:
public static void main(String[] args){Students s1 = new Students(new int[] {123, 456, 789});Students s2 = new Students(new int[] {123, 456, 789, 555});Students s3 = new Students(new int[] {123, 456, 789});if (s1.equals(s2)){System.out.println("s1 == s2");}if (s1.equals(s3)){System.out.println("s1 == s3");}} // end mainWrite a public method named equals for your Students class that tests whether two Students objects are equal. Your equals method should be written such that the above main method would produce this output:
s1 == s3
Only provide code for the asked-for equals method; do not provide code for the entire Students class.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.