String[] fruits = {"apple", "orange", "pear"}; for(int i=0; i<fruits.length; i++) { System.out.println(fruits[i]); }