Java Examples - Array Output
The following example demonstrates how to output an array using a loop:
Welcome.java file
public class Welcome {
public static void main(String[] args){
String[] examples = new String[3];
examples[0] = "Example";
examples[1] = "Example Tools";
examples[2] = "Example Notes";
for (int i = 0; i < examples.length; i++){
System.out.println(examples[i]);
}
}
}
The output of the above code is:
Example TutorialOther Extensions