Skip to content

Instantly share code, notes, and snippets.

@dariogabriel113
Last active June 30, 2018 04:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dariogabriel113/59b45dfed6b80c1a2612f5af14ae30e5 to your computer and use it in GitHub Desktop.
Save dariogabriel113/59b45dfed6b80c1a2612f5af14ae30e5 to your computer and use it in GitHub Desktop.
public class TestaCondicional2 {
public static void main(String[] args) {
System.out.println("testando condicionais");
int idade = 16;
int quantidadePessoas = 3;
boolean acompanhado = quantidadePessoas >= 2;
if (idade >= 18 && acompanhado) {
System.out.println("Seja bem vindo");
} else {
System.out.println("infelizmente voce nao pode entrar");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment