public class App {
public static void main(String[] args) throws Exception {
System.out.println("Java Version: " + System.getProperty("java.vm.version"));
for (int i = 0; true; i++) {
for (int j = 0; j < 100; j++) {
// short delay (required)
}
String s = "hello";
s = new StringBuilder(String.valueOf(s)).append(s).toString();
s = new StringBuilder(String.valueOf(s)).append(s).toString();
if (s.length() != 20) {
System.out.println("Failed at iteration: " + i);
System.out.println("Length mismatch: " + s.length() + " <> " + 16);
System.out.println("Expected: \"hellohellohellohello\"");
System.out.println("Actual: \"" + s + "\"");
System.exit(0);
}
}
}
}