Java Datatypes Hackerrank Solution