Java tutorial
//package com.java2s; import java.util.Calendar; import java.util.LinkedList; public class Main { public static LinkedList<String> getAniosVigencia() { Calendar c = Calendar.getInstance(); int anio = c.get(Calendar.YEAR); LinkedList<String> anios = new LinkedList<String>(); int amount = anio + 7; for (int i = anio; i < amount; i++) { anios.add("" + i); } return anios; } }