In the code below, message is a final String that have a \n inside it, and it doesn’t work.
message = format = "Blah %d Blah Blah \nBlah Blah %s Blah"
interventionSize = number
UserID = String
String.format(Dic.message,interventionSize,userID)
How can I make the line break in this case, cannot find an answer.
BTW, I cannot use any kind of framework or external jar to do that (old code) have to use Plain Old Java.
Having
\nin a format string is just fine.Perhaps you should try a platform specific new-line. With format strings you can use
%n.That is, try the following: