Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package punto3;
- import java.util.Calendar;
- public class Fecha {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Calendar calendario = Calendar.getInstance();
- String[] Dias = new String[]{"Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado"};
- for(int i=0;i<=100;i++) {
- System.out.println("Fecha "+calendario.get(Calendar.DAY_OF_MONTH)+"/"+(calendario.get(Calendar.MONTH)+1)+"/"+calendario.get(Calendar.YEAR)+" dia "+Dias[calendario.get(Calendar.DAY_OF_WEEK)-1]);
- calendario.add(Calendar.YEAR, 1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement