Is it OK to have if statement in the constructor
Thanks
public class CTime {
private int start_hour;
private int end_hour;
private int start_minute;
private int end_minute;
public CTime(int h1,int m1,int h2,int m2){
if(h1>=7 && h2<17 && h2*60+m2>h1*60+m1){
setStartHour(h1);
setStartMinute(m1);
setEndHour(h2);
setEndMinute(m2);
}
}