SHARE
TWEET

Untitled

a guest Oct 8th, 2012 33 Never
  1.     public static String getWeekDayName (int dayInWeek) {
  2.         switch (dayInWeek) {
  3.             case 0: return "Sunday";
  4.             case 1: return "Modnay";
  5.             case 2: return "Tuesday";
  6.             case 3: return "Wednesday";
  7.             case 4: return "Thursday";
  8.             case 5: return "Friday";
  9.             case 6: return "Saturday";
  10.             default:
  11.             System.out.println("Bad dayInWeek Value: " + dayInWeek + "in Date2300.getWeekDayName");
  12.                     return "Invalid Day In Week Number: " + dayInWeek + "." ;
  13.         }
  14.     }
  15.    
  16.  
  17. and then later on I try to print the name of the day based on the above method
  18.  
  19.     public String toStringMore(){
  20.         return (getWeekDayName + ", " + month + " " + day + ", " + year + ".");
  21.     }
RAW Paste Data
Top