public class Assert{
private Boolean isvalid(int i)
{
if(i<1 || i>12)
return new Boolean("Incorrect value");
else
return new Boolean(true);
}
void testvalue(int val)
{
assert isvalid(val):"out of range value"; //1
}
public static void main(
String args[])
{
Assert test=new Assert();
test.testvalue(12);
}
}
it compiles even when asserions are enabled but it should not as at 1 boolean expression is required not Boolean type. can anyone help me out.. why it is compiling?