could you please help me understand this ternary operatorpublic static <E> void replace(List<E> list, E val, E newVal) {    for (ListIterator<E> it = list.listIterator(); it.hasNext(); )        if (val == null ? it.next() == null : val.equals(it.next()))            it.set(newVal);}i thought the part after ? is just a regular statement, so how is == being used here?
ternary operator usage within IF brackets
conditions