Red line = illegal start of expressionCode:package arrayMainFrm; public class SimpleArray { public static void main ( String Args[] ) { int myArray[] = {1,6,245,72,4,6,1,1,1}; myArray = checkA(myArray[]); for ( int i = 0;i<myArray.length;i++) System.out.println(myArray[i]); } public static int checkA(int newArray[]) { for ( int i = 0;i<newArray.length;i++) newArray[i]=newArray[i]*2; } }![]()




Reply With Quote