You can basically also do as well

/* only for testing */

public class main{

public static void main (String[] args){

int array[]= {2, 5, 7, 8, 9}