Change your code to use String concatenation in that spot?
i.e.
|
Code:
|
File f = new File(directory, "info" + ".txt"); |
Edit: This
is, afterall, essentially what createTempFile does (although it might create the name in a String var, then use that single String var, the principle is the same). It also uses "prefix" + "oneUpNumberNormally" + "suffix", but that is simply taking it one step further.