The following program is wrong. Reorder the lines so that the program displays morning followed by afternoon .

Views 19857

Answer:

Wrong Order

1 public static void main(String[] args) {
2 }
3 public class Welcome {
4 System.out.println("afternoon");
5 System.out.println("morning");
6 } 

Correct Order

public class Welcome {
  public static void main(String[] args) {
    System.out.println("morning");
    System.out.println("afternoon");
  }
}

Related Articles:

This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of Java Programming Language, click the links and dive deeper into this subject.

Join Our telegram group to ask Questions

Click below button to join our groups.