start to write java version leetcode