Here you can find the source of getDayOfWeek(int index)
private static String getDayOfWeek(int index)
//package com.java2s; public class Main { private static String getDayOfWeek(int index) { final int SUNDAY = 1; final int MONDAY = 2; final int TUESDAY = 3; final int WEDNESDAY = 4; final int THURSDAY = 5; final int FRIDAY = 6; final int SATURDAY = 7; String day = ""; switch (index) { case SUNDAY: day = "SUNDAY"; break; case MONDAY: day = "MONDAY"; break; case TUESDAY: day = "TUESDAY"; break; case WEDNESDAY: day = "WEDNESDAY"; break; case THURSDAY: day = "THURSDAY"; break; case FRIDAY: day = "FRIDAY"; break; case SATURDAY: day = "SATURDAY"; break; }/*from www . ja v a2 s .co m*/ return day; } }