{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Day - else if(day == 2 || day == 22 return(month""...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
package lab09; p public class Day { p private String month; private int day; p public Day(String month, int number){ this.month = month; this.day = number; } public String toString(){ if(day == 1 || day == 21 || day == 31){ return (month + " " + day + "st");
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } else if(day == 2 || day == 22){ return (month + " " + day + "nd"); } else if(day == 3 || day == 23){ return (month + " " + day + "rd"); } else return (month + " " + day + "th"); } }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online