Java - Methods and Code Reusability
Identify the error in this method:
public int calculate() {
int result = 10;
if (result > 5) {
return result;
}
}public int calculate() {
int result = 10;
if (result > 5) {
return result;
}
}15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions