int values[] = {1,2,3,4}; for(int i = 0; i < values.length; i++) {  	System.out.println(values[i]);  }

Read more of this post