> Please help me with this simple Java 'problem'?

Please help me with this simple Java 'problem'?

Posted at: 2014-12-18 
You put a semicolon after the if condition.

And the rest is also not correct, I guess you need this:

if (x >= -5) y = x * x;

else y = -x;

System.out.println("y = " + y);

Please help me write a Java program that calculates and prints the piecewise function. on the picture below. I tried to do it myself . Where did I make a mistakes ? Here's what I did :http://s8.postimg.org/bwgulbmit/image.png