public class AssertTest{
public void writeFile(FileOutputStrem fout){
assert fout!=null:"Invalid Handle file";
try{
fout.write(1);
fout.close();
}catch(IOException ignore){
}
}//invalid use of aasertions should not be used to check validity of public arguments
public assertDemo{
public
String getLanguage(String code){
String str=null;
assert str!=null;
return str;
}
} //irrespective of visibility it is valid to use assertions tocheck for postconditions
not able to understand what exactly is the difference.please help to clear my doubt.