public String displayType(int side1, int side2,int side3)
{
if(( side1+side2 > side3))
if(( side1==side2) && (side2==side3))//tell if
The reason is that, What happens all of your conditions failed to execute ??
Possible solutions :
You need to provide an else block there.When you provide a else
block, then it is sure that always there is a chance to return the
value, either in if
or in else
.
A default return statement without regarding if-else
, where the
returning value should be decide in blocks.