Noel KAMPHOA@nkamphoa
To understand the need to master primitive types in Java, let's see if you can figure out what's wrong with this piece of code.
int fact(int n){
int val = n;
int i = n - 1;
while(i>0){
val = val * i;
i = i - 1;
}
return val;
}
#JavaBasics
8064.5K

















