Question: IN JAVA 2 3 4 5 6 7 8 9 0 Given two sets of strings (stored in two arrays), determine if they are the
IN JAVA

2 3 4 5 6 7 8 9 0 Given two sets of strings (stored in two arrays), determine if they are the same set i.e. contain the same set of strings public class SetChecker { 4. public static void main(String[] args) String() setA = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; String li setB = {"January", "March", "April", "May", "June", "Jly", "August", "September", "October", "November", "December"}; System.out.print("The elements of the arrays set and setB "); if (!sameSet (seta, setB)) { System.out.print("do not "); System.out.println("form the same set."); System.out.println("Expected: The elements of the arrays setA and setB do not form the same set." ); 6 8 9 0 1 2 3 24 5 26 27 28 9 30 1 2 3 4 55 6 7 8 9 10 -1 12 13 String() setWinterA = {"Jan", "Feb", "Mar", "Apr"}; String[setWinterB = {"Jan", "Mar", "Apr", "Feb"}; System.out.print("The elements of the arrays setWinter and setWinterb "); if (!sameSet (setWinter, setWinterb)) { System.out.print("do not "); System.out.println("form the same set."); System.out.println("Expected: The elements of the arrays setWinterA and setWinterb form the same set." ); public static boolean sameSet(String[] a, String) b) for (int i = 0; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
