Simple Java Program 2: Display The 7 Continents

Another simple java program. This displays the seven continents of the world. Just like the previous one, we will only use "System.out.println()" to make this possible.

public class Continents {

    public static void main(String[] args) {
        System.out.println("Africa");
        System.out.println("Antarctica");
        System.out.println("Asia");
        System.out.println("Australia");
        System.out.println("Europe");
        System.out.println("North America");
        System.out.println("South America");
    }

}


Here's the output:



Comments