![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbYPchB%2FbtsMgJ5lDbR%2Fcun78YdGtmJIgTwdiEqim0%2Fimg.png)
Comparable: 비교할 수 있는Comparator: 비교자package generic;import java.awt.Button;import java.util.ArrayList;import java.util.Comparator;public class Test { public static void main(String[] args) { int []arr1= {1,2,3}; // homogeneous collection String []arr2= {"hello","hi","bye"};// homogeneous collection Object []arr3= new Object[3];//heterogeneous collection arr3[0]="hello"; arr3[1]=new Test(); ..