{
private final static int size = 15;
int[] arrOfNum = new int[size];
public DataStructure()
{
for (int i = 0; i < size; i++)
{
arrOfNum[i] = i;
}
}
public void display()
{
for (int i = 0; i < size; i++)
{
System.out.println(arrOfNum[i]);
}
}
}
class PublicClassDemo
{
public static void main(String args[])
{
DataStructure dsObj = new DataStructure();
ds.display();
}
}
Output
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14