Question: What's the error in the following code segment? public static double foo(b, t) { double a = 0; if(b >= 1000) a = b
What's the error in the following code segment? public static double foo(b, t) { double a = 0; if(b >= 1000) a = b * t 0.3; else if(p >= 1000) else a = b * t* 0.4; a = b * t; return a; } Wrong method header Wrong No return statement Missing {} in if statements Unknown variable
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
