Using a method call as part of a String requires that the method return a value.
range is void so the compiler can not get any value to convert and add to the String.

When I compile your code I...