I have this piece of code, I think I have all the braces covered. Still getting braces not closed error. When I put more braces, then gives me something else. Can you anybody tell me what I am doing wrong here?
public static boolean isValid(int day, int month, int year)
{
if (year < 1900)
{
return false;
}
else {
if (month>0 && month<13)
{
if (month==1 || month==3 || month==5 || month==7 || month==8 || month==10 || month==12)
{
return day > 0 && day <=31;
}
else if (month==4 || month==6 || month==9 || month==11)
{
return day>0 && day<=30;
}
else if (month==2)
{
if (isLeap(year))
{
//(d= 29);
return day>0 && day <=29;
}
else {
return day>0 && day<= 28;
}
}
}
}
}
}