Ternary operator on double value
public class Main { public static void main(String[] args) { double d = 5.0; d *= 4.0; System.out.println("d = " + d); System.out.println("Ternary: " + (d == 5 ? "yes" : "no")); } }