I created an array, and I am trying to pass it to a method then double the size of that array. Than I would like to print the array. I am at a loss right now as to why it wont print, and what I am doing wrong. Any help appreciated. Thanks!
public class test {
public static void main(String[] args) {
int[] list = {1,2,3,4,5};
}
public static int[] doubleCapacity(int[] list) {
for(int i = 0; i < list.length; i++){
System.out.println(list);
}
return list;