add Majorityelement.java class