add majorityElement.java class