String str = new String(" apples "); str.trim(); // result is a nes string "apple"
System.out.printf("%-20s", str);