Question: Consider the following code: 1 int numberoffriends = 7 ; if ( numberoffriends > 5 ) { int numberofcars = 2 ; else { int
Consider the following code:
int numberoffriends ;
if numberoffriends
int numberofcars ;
else
int numberofcars ;
system.out.printlnWe will need to take numberofCars cars.";
The code has an error. What is it
On line the variable numberOfCars has a scoping issue and does not exist
There is a semicolon issue
It is possible that numberofCars has not been declared
There is a bracket issue
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
