Missing return statement!
Hi all,
im sarathy from India, im new (at least to this forum) to java.
When I try following code my pretty javac got angry and scolded me something like 揗issing return statement?
It looks natural that any one of if block or else block will definitely be executed irrespective of my test condition.
So I抦 no longer doing any hurt for my 搄avac?still why it抯 getting angry?
publicstaticlong getSize(File f,long totalsize){
if (f.isDirectory()){
//some more codes here!
return totalsize + getSize(new File(fl[i]), totalsize);
}
else{
return totalsize+f.length();
}
}
Thanks and regards
Sarathy

