1public class OddEvenInArrayExample{
2public static void main(String args[]){
3int a[]={1,2,5,6,3,2};
4System.out.println("Odd Numbers:");
5for(int i=0;i<a.length;i++){
6if(a[i]%2!=0){
7System.out.println(a[i]);
8}
9}
10System.out.println("Even Numbers:");
11for(int i=0;i<a.length;i++){
12if(a[i]%2==0){
13System.out.println(a[i]);
14}
15}
16}}