Java Basic Questions Leetcode Javascript 30