вроде все как надо сделал...
package com.javarush.task.pro.task16.task1601;
import com.sun.source.tree.IfTree;
import java.util.Calendar;
import java.util.Date;
/*
Лишь бы не в понедельник :)
*/
public class Solution {
static Date birthDate = new Date(101, 8, 12);
public static void main(String[] args) {
System.out.println(getDayOfWeek(birthDate));
}
static String getDayOfWeek(Date date) {
switch (date.getDay()) {
case 0:
return "Понедельник";
case 1:
return "Вторник";
case 2:
return "Среда";
case 3:
return "Четверг";
case 4:
return "Пятница";
case 5:
return "Суббота";
case 6:
return "Воскресенье";
}
return "";
}
}