We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
What I did was just order my return statements at the end of the method from smallest to greatest, so if max was a smaller type value, it would return first, regardless of whether or not it was equal to a larger type value. Please let me know if this is bad practice to have multiple return statements like this, I'm new to programming. My method:
Migratory Birds
You are viewing a single comment's thread. Return to all comments →
What I did was just order my return statements at the end of the method from smallest to greatest, so if max was a smaller type value, it would return first, regardless of whether or not it was equal to a larger type value. Please let me know if this is bad practice to have multiple return statements like this, I'm new to programming. My method: