A java program that trims lines and removes empty ones