DUET PG Score Card 2021
NHAI Recruitment 2021
Bihar Board 12th Dummy Admit Card 2022
RBI Assistant Notification 2021
Jee Advanced 2021 Result
NIACL Assistant Recruitment 2021
SBI PO Online Form 2021

Create a class IsWorkingDay with a main method. The method receives one command line argument which is the name of the weekday

Create a class IsWorkingDay with a main method. The method receives one command line argument which is the name of the weekday. If the argument is equal to Sunday or Saturday the program should print Holiday, otherwise it should print Working Day.

For Example:

Cmd Args : Monday
Working Day

Solution:

package q10845;
public class IsWorkingDay{
	public static void main(String[] args) {
		if (args[0].equals("Sunday") || args[0].equals("Saturday")) {
			System.out.println("Holiday");
		} else {
			System.out.println("Working Day");
		}
	}
}

Candidates having any kind of query so he/she can ask in our comment section. Our Panel will b reverting back as soon as possible. Thank You. For more details visit our website (https://speedjobalert.com/)

Leave a Comment