Guest User

Untitled

a guest
Nov 18th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. public class OperadoresLogicosNot {
  2. public static void main(String[] args) {
  3. boolean x = false;
  4. boolean y = true;
  5. boolean resultado = ((!x==true)); //DECIMOS QUE X NO ES IGUAL A TRUE.
  6. System.out.println(resultado); // X NO = TRUE Y EL VALOR DE Y = FALSE POR LO TANTO IMPRIMIRÁ VERDADERO (TRUE)
  7. resultado = ((!y==true)); //DECIMOS QUE Y NO ES IGUAL A TRUE.
  8. System.out.println(resultado); //Y NO = TRUE Y EL VALOR DE Y = TRUE POR LO TANTO IMPRIMIRÁ FALSO (FALSE)
  9. }
  10. }
Add Comment
Please, Sign In to add comment