I want to compare values and execute some condition if some of the values are found. In Java I tried using this code:
if(item.getLenght().compareTo(BigDecimal.valueOf(50))
|| item.getSocre().compareTo(BigDecimal.valueOf(500))
|| item.getAge().compareTo(BigDecimal.valueOf(5000)))
{
....... do some action
}
But I get error Operator '||' cannot be applied to 'int', 'int'
What is the proper way to implement this check?