int i ;
i<=5?1:0;
System.out.println(i);
When it is compiled, the screen prints "not a statement".
i<=5?1:0;
^
What does it mean? Or where is the error?
First, the local variable 'i' is not initialized; you must explicitly initialize it
int i=0;
Secondly, the ternary operator returns a value and that value must be assigned to a variable
int i = 0;
int result = 0;
result = i<=5?1:0;
or you can print the result directly
System.out.println(i<=5?1:0);
byte i=125;
i<<-4
This shift expression is equivalent to i<<124. To learn more about negative shifting you can check out MM post
here