- public class Example {
- public static void main(String [] args){
- int[] numbers = new int[]{1,2,3,4,5,6,7,8,9,10,11,12};
- int x = 0;
- while(x<numbers.lenth){
- if(numbers[x]%2 == 0)
- System.out.println(numbers[x]+ " is even");
- else
- System.out.println(numbers[x]+ " is odd");
- x = x + 1;
- }
- }
- }