Java progarm to Display the elements in an array individually

 public class Main {

public static void main(String[] args) {
int[] num ={1,5,6,77,88};
System.out.println(num[0]);
System.out.println(num[1]);
System.out.println(num[2]);
System.out.println(num[3]);
System.out.println(num[4]);
}
}

OUTPUT:
1
5
6
77
88

Comments

Popular posts from this blog

Java Program to create a large array and copy its values equally to two small arrays and display the second array only

Python program to sum up the Salary when the Name and Age matches with subsequent rows.