Coders Packet

Printing Week days Using Java

By KOMMU GANESH

In this tutorial, we are going to build a code for printing Week days using java programming language.

Process of Printing System:

Generally, every Week has 7 days. So the below java program allows an individual can print a particular day in a week, like Monday, Tuesday, Wednesday, Thursday, Friday, Saturday and Sunday.
Using different kinds of statements and loops, the printing system is allocated to print the Week days. This is all about the brief description of the below java project.

public class Main
{
  public static void main(String[] args) 
  {
    int x;
    for(x=0;x<7;x++)
    switch(x)
    {
        case 0:
            System.out.println("Sunday");
            break;
        case 1:
            System.out.println("Monday");
            break;
            case 2:
            System.out.println("Tuesday");
            break;
        case 3:
            System.out.println("Wednesday");
            break;   
        case 4:
            System.out.println("Thursday");
            break;
        case 5:
            System.out.println("Friday");
            break;
        case 6:
            System.out.println("Saturday");
            break;     
       default:System.out.println("No week days");      
    }
  }
}

Output:

Download project

Reviews Report

Submitted by KOMMU GANESH (Ganesh09)

Download packets of source code on Coders Packet