Https Leetcode Com Problems Nested If Syntax In Java