public class Increment
{
	public static void main(String[] args)
	{
		// Starting at zero because floats are small
		// Explicit cast required to because 0.0 is parsed as a double
		float incrementee = (float)0.0;

		// Stop counting when we lose resolution of 1.0
		while((incrementee + (float)1.0) - incrementee > 0.999999999) {
			incrementee += 1.0;
		}

		System.out.printf("%f\n", incrementee);
	}
}

public class Increment
{
	public static void main(String[] args)
	{
		// Starting at zero because floats are small
		// Explicitly create as a float rather than double
		float incrementee = 0.0f;

		// Stop counting when we lose resolution of 1.0
		while((incrementee + 1.0f) - incrementee > 0.999999999) {
			incrementee += 1.0f;
		}

		System.out.printf("%f\n", incrementee);
	}
}

Change numeric float constants to use the `f` suffix in Java