Hi I currently have 4 arrays all holding different data the issue i have run into is that i want to sort one of the arrays alphabetically which normally i would just do like this 

```
class IgnoreCaseComparator implements Comparator<String> {
   public int compare(String strA, String strB) {
      return strA.compareToIgnoreCase(strB);
   }
}
IgnoreCaseComparator icc = new IgnoreCaseComparator();
java.util.Collections.sort(ARRAY,icc);

```

Where ARRAY would be the array I want to sort Alphabetically however I need the arrays to sort together.

So for example lets say my arrays look like this

```
Pet Array: [Dog, Cat, Bird]
Owner Array: [Jim, Kyle, Joe]
Friend Array: [Jake, Jim, John]
Cat Array: [false, true, false]

```

And i want to sort based on Pet Array my output should be like this where all of the third values are now the first and the first values are now the third (This is way over simplified my actual arrays contains thousands of inputs)

```
Pet Array: [Bird, Cat, Dog]
Owner Array: [Joe, Kyle, Jim]
Friend Array: [John, Jim, Jake]
Cat Array: [false, true, false]

```

Is there an easy way to do this where i can sort one array and have the others follow. Thank you for any help with this issue.

**===EDIT===**

Other than my solution being slightly different cause i did a little reading the checked answer is perfect i only have a slightly different return line in the compareTo method

```
    class Entity implements Comparable<Entity> {
        String Pet;
        String Owner;
        String Friend;
        int Cat;

        Entity(String Pet, String Owner, String Friend, int Cat) {
          this.Pet = Pet;
          this.Owner = Owner;
          this.Friend = Friend;
          this.Cat = Cat;
        }

        @Override
        public int compareTo(Entity other) {
            return this.Pet.compareToIgnoreCase(other.Pet);
        }
     }

```