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:
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
Post a Comment