Link to home
Start Free TrialLog in
Avatar of LelloLello
LelloLello

asked on

Function.

What the following function return in my code ?  it's not running?
Avatar of LelloLello
LelloLello

ASKER

Into my code that should return a or b or c ?
a) joe, b)4 experts, or c)5 experts?


package{
class Room{
private var experts:int = 4;
public function DoThis () : String
{
var messageString : String
switch (experts){
case 0 :
messageString = ' joe’;
case 4 :
messageString = 4 experts ';
case 5 :
messageString = '5 experts ';
} return messageString;
}
}
}
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial