How to write a ternaries operator in Java

How to write a ternaries operator in Java

Java can be a bit of a pain in the arse, but it can be useful to write operators that can do just about anything you can imagine.Ternary operators let you do simple mathematical operations and get results from a range of numbers.Here’s how you can write one in your favourite language: ternARY operator tern,ary,operator,ary(java)…