Question: I need help coding a program in Java that prints all the strings in an array that contain the same characters in ascending order. Please
I need help coding a program in Java that prints all the strings in an array that contain the same characters in ascending order. Please provide code with comments that is easy to understand and follow.
The detailed instructions and examples are shown below:

I have attempted the question myself, please edit my code to get the correct results. This is my code:
import java.util.ArrayList; import java.util.Arrays;
public class ProblemA021 { public static boolean check(String str1, String str2) { char [] arr1 = str1.toCharArray(); char [] arr2 = str2.toCharArray(); Arrays.sort(arr1); Arrays.sort(arr2); boolean checker=false; if(Arrays.equals(arr1, arr2) == true) { checker=true; } return checker; } public static ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
