This week's book giveaway is in the Testing forum. We're giving away four copies of Data Structures the Fun Way: An Amusing Adventure with Coffee-Filled Examples and have Jeremy Kubica on-line! See this thread for details.
I am experimenting with some ai software, so I'm not that familiar with the source, which I don't think has been updated in a while. While running, a part that is supposed to create a graph throws this error:
By looking at the first place where the error shows up after the java.lang, I traced it to this snippet in "com.xapagy.ui.TextUiHelper.wrap":
Avoid \n (even though you see it in many books) because it is platform‑specific. Use
myString + System.lineSeparator() instead. That method only works in Java8; in older versions you would have to use something like
myString + System.getProperty("line.separator") … or keep that separator as a constant somewhere.