Advertisement
Stelios_Gakis

Exercise_5/Task_1

Oct 4th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. public class Task_1 {
  2.     public static void main(String[] args) {
  3.         String[] months = new String[]{"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
  4.  
  5.         for (String element: months) {
  6.             if (element.equals("June")) {
  7.                 System.out.print(element);
  8.                 System.out.println(", this is the best month by the way");
  9.             } else {
  10.                 System.out.println(element);
  11.             }
  12.         }
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement