four I wonder why you may have troubles to easily generate Program.out.println("n)"; The "n" considers as escape sequence for C/C++/C# and Java aswell.Your second instance will reset the exception's stack trace. The 1st most correctly preserves the origins from the exception.You may consider introducing rn in place of just n. Based on your function