Back To Java Arrays Index
//program to input integer array of size 5 using while loop and then display the integer array using while loop public class intarraywhile { public static void main(String[] args) { int []marks={88,78,89,90,77}; int i=0; System.out.println("displaying marks"); i=0; while(i<5) { System.out.println("marks in subject " + (i+1) + " are " + marks[i]); i++; } } }