Skip to content

Commit 48675d4

Browse files
authored
Update If.java
1 parent 8779d2d commit 48675d4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Java/controle/If.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import javax.swing.JOptionPane;
44

5+
//O if faz comparações lógicas
6+
57
public class If {
68

79
public static void main(String[] args) {
@@ -11,7 +13,9 @@ public static void main(String[] args) {
1113
value = JOptionPane.showInputDialog("Qual foi sua nota ?");
1214

1315
nota = Double.parseDouble(value);
14-
16+
17+
//Para utilizar o if basta inserir dentro de sua notação comparações e testes que retornem valores
18+
//verdadeiros (true) ou falso (false)
1519
if(nota >= 9) {
1620
JOptionPane.showMessageDialog(null, "Foi para o quadro de honra!");
1721
}else {

0 commit comments

Comments
 (0)