I am wondering if there is any performance differences between
String s = someObject.toString(); System.out.println(s);
and
System.out.pr
If you have critical code sections that demand performance, avoid using System.out.println(). There is more overhead incurred by going to standard output than there ever will be with a variable assignment.
System.out.println()
Do solution 1.
Edit: or solution 2