Unary Operator


\begin{lstlisting}
class UnaryOperator {
public static void main(String[] args)...
...ut.println(''!flag = '' + !flag);
// flag is still false.
}
}
\end{lstlisting}

The output for above code will be as below


\begin{lstlisting}
+number = 5.2
-number = -5.2
number = 6.2
number = 5.2
!flag = true
\end{lstlisting}