Unverified Commit 1b08296a authored by Lokesh Singh's avatar Lokesh Singh Committed by GitHub

Create printArray.java

parent 4f42a072
package javaLearning;
public class printArray {
public static void main(String args[]) {
int[] intArray = new int[5];
intArray[0] = 1;
intArray[1] = 2;
intArray[2] = 3;
intArray[3] = 4;
intArray[4] = 5;
for(int i = 0; i < intArray.length; i++) {
System.out.println("Element of index " + i + ":" + intArray[i]);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment