This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 8th, 2012  |  syntax: None  |  size: 0.78 KB  |  views: 33  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.     }
clone this paste RAW Paste Data