' have this error despite there being many return statements returning a value depending on specific string inputs from the user.
public int convertPosition(String pos)
{
if (pos.equals("dean"))
{
return 0;
}
else if (pos.equals("chair"))
{
return 1;
}
else if (pos.equals("professor"))
{
return 2;
}
else if (pos.equals("secretary"))
{
return 3;
}
else if (pos.equals("teaching"))
{
return 4;
}
else if(pos.equals("otherwise"))
{
return -1;
}
}