I had problem returning the string although I've placed both return statements inside the if else condition.
public String getAvailableRooms(int numofGuest)
{
int i;
for (i=0; i<rooms.length; i++)
{
if(rooms[i].getstatusRoom()==false)
rooms[i].getnumofBeds();
}
String temp = "The available room is room " + i + "and the number of beds " + rooms[i].getnumofBeds();
if (rooms[i].getnumofBeds() >= numofGuest)
return temp;
else if (numofGuest> 4)
return "Theres no available room";
}