java program to check a number is positive or negative using ternary operator