This language bar is your friend. Select your favorite languages!
Edit summary for version 8 :

Version 7

Version 8

Idiom #59 Write to standard error stream

Print the message "x is negative" to standard error (stderr), with integer x value substitution (e.g. "-2 is negative").

Idiom #59 Write to standard error stream

Print the message "x is negative" to standard error (stderr), with integer x value substitution (e.g. "-2 is negative").

Code
System.err.println(x + " is negative");
Code
System.err.format("%d is negative",x);
Demo URL
https://ideone.com/aiFVno
Demo URL
https://ideone.com/aiFVno