Last active
June 30, 2018 04:29
-
-
Save dariogabriel113/0040f5a6467e32c0fc5ff635510c456f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestaEscopo { | |
public static void main(String[] args) { | |
System.out.println("testando condicionais"); | |
int idade = 20; | |
int quantidadePessoas = 3; | |
boolean acompanhado = false; | |
if (quantidadePessoas >= 2) { | |
acompanhado = true; | |
} | |
if (idade >= 18 || acompanhado) { | |
System.out.println("Seja bem vindo"); | |
} else { | |
System.out.println("Infelizmente voce não pode entrar"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment