which one is better
System.out.println(\"hello world\");
or
String s=\"hello world\"; System.out.println(s);
Check out JLS to understand how strings are treated internally by JVM.