Generics
public class _01_Generics { public static void main(String[] args) { int[] iArray = { 1, 2, 3, 4, 5 }; double[] dArray = { 1.0, 2.0, 3.0, 4.0, 5.0 }; String[] sArray = { "A", "B", "C", "D", "E" }; printAnyArray(iArray); printAnyArray(dArray); printAnyArray(sArray); } private static void printAnyArray(T[] array) { for (T t : array) { System.out.print(t + " "); } System.out.println(); } } The prob..
2023. 5. 29.