package org.kodejava.example.fundametal; public class NegationOperator { public static void main(String[] args) { // // negate the result of boolean expressions // boolean negate = !(2 < 3); boolean value = !false; System.out.println("result: " + negate); System.out.println("value : " + value); } }Here is the result of the program:
result: false
value : true
Aucun commentaire:
Enregistrer un commentaire