|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Missing return statement
there is an error on the last closing bracket that says missing return statement, but i dont know what its asking me to return
public PedalBoat findPedalBoat() { PedalBoat myPedalBoat = null; // loop through list of boats for ( int i=0; i < numPedalBoats; i++) { if (thePedalBoats.get(i) instanceof PedalBoat) { PedalBoat myPedalBoats = (PedalBoat)(thePedalBoats.get(i)); if(myPedalBoat.getHired()== false); // string compare { System.out.println(myPedalBoats.toString()); } } } // return PedalBoat; } |
|
#2
|
|||
|
|||
|
You should return PedalBoat as you had it.
Quote:
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > Missing return statement |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|