Java nos vemos el próximo año feliz
import java.util.*;
public class HappyYear {
static public int nextHappyYear(int year) {
for (;;) if (new HashSet(Arrays.asList((++year+"").split(""))).size() == 4) return year;
}
}
ofroog