Search your topic here

Array 1

PROGRAM:

public class Array {

int arr[] = {1,2,3,4,5,6,7};
int i;
void display(){
            System.out.println("Displayin array elements");
            for(i=0;i<7 span="">i++){
                        System.out.println(arr[i]);
            }
}
public static void main(String args[]){
            Array d = new Array();
            d.display();
}
}

OUTPUT:
Displayin array elements
1
2
3
4
5
6

7

LEAVE A REPLY