Challenge 1 / 2
We're building a new class of planets that always have the same radius. We're in a heated (geeky) debate over whether or not to make a method static. Here are the two options:
// OPTION 1
class StaticallySizedPlanet
{
public function getRadius()
{
return 250;
}
}
// OPTION 2
class StaticallySizedPlanet
{
public static function getRadius()
{
return 250;
}
}
Which would you recommend?
Skip challenges and go to theNext Chapter