Here you can find the source of getWeekDayStr(int dayInWeek)
public static String getWeekDayStr(int dayInWeek)
//package com.java2s; import java.util.*; public class Main { public static String getWeekDayStr(int dayInWeek) { StringBuffer dateStr = new StringBuffer(); switch (dayInWeek) { case Calendar.MONDAY: dateStr.append("Monday"); break; case Calendar.TUESDAY: dateStr.append("Tuesday"); break; case Calendar.WEDNESDAY: dateStr.append("Wednesday"); break; case Calendar.THURSDAY: dateStr.append("Thursday"); break; case Calendar.FRIDAY: dateStr.append("Friday"); break; case Calendar.SATURDAY: dateStr.append("Saturday"); break; case Calendar.SUNDAY: dateStr.append("Sunday"); break; }// w w w .jav a 2 s . com return dateStr.toString(); } }