creates a percent class in java