I have to make a program that depending the day of the week tells me to rest or study, I made an input feature to ask me for the day so I can write for example "monday", I wanna be able to use an if and inside the condition ask "day.contains("Monday") and if so then print study. this is the code I made for now
import java.util.Scanner;
public class main {
public static void main(String[] args) {
Scanner myObj = new Scanner(System.in);
String day;
System.out.println("Please specify a day");
day = myObj.nextLine();
if (day.contains("Monday"){
System.out.println("Good day.");
}
}
}
