java classes for max