在Java中,数组的定义方法有两种:
int[] numbers = {1, 2, 3, 4, 5}; String[] names = {"Alice", "Bob", "Carol"};
int[] numbers = new int[5]; String[] names = new String[3];