- :
import java.io.IOException;
public class Date() {
private int d, m, y;
public Date(int d, m, y) throws IOException {
final int currentYear=2014;
if (d<0||m<0||y<0||d>31||m>12||y>currentYear) throw new IOException();
this.d=d;
}
}
. , , , , , , , , , , - , , .