Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String toString() {
- return this.jour+"/"+this.mois+"/"+this.annee;
- }
- public Date suivant() {
- if (this.jour == dernierJourDuMois() && this.mois == 12){
- return new Date(01, 01, this.annee++);
- }
- if (this.jour == dernierJourDuMois()) {
- return new Date(01, this.mois++, this.annee);
- }
- return new Date(this.jour++, this.mois, this.annee);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement