public class ArrayBasic
{
public static void main(String[] args)
{
//Declare an int array of size 100
int[] array = new int[100];
//insert elements using for loop
for(int i= 0; i<=99; i++)
{
array[i] = i;
}
//display elements
for(int i = 0; i <=99; i++)
{
System.out.println("Index" + i + " =" + array[i]);
}
}
}
Saturday, 26 April 2014
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment