Advertisement
sergAccount

Untitled

Aug 2nd, 2020
1,482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.22 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package com.mycompany.app4;
  7.  
  8.  
  9. public class Test {
  10.    
  11.     //
  12.     public static void main(String[] args) {
  13.         //
  14.         System.out.println("Операторы управления");
  15.         // Операторы управления
  16.         // 1) if-else (условный оператор)  
  17.         // позволяет выполнить действие в зависимости от условия (разветвить выполнение кода)
  18.         // 1.1) if
  19.         if(20>10){
  20.             System.out.println("20 больше 10");
  21.             System.out.println("!!!");
  22.         }        
  23.         boolean a = false;
  24.         if(a){
  25.             System.out.println("a = TRUE !!!");
  26.         }        
  27.         boolean b = false;
  28.         if(b){
  29.             System.out.println("b = TRUE!!!");
  30.         } else {
  31.             System.out.println("b = FALSE!!!");
  32.             System.out.println("sfaasfsaf!!!");
  33.             System.out.println("dfasfasf");
  34.             int r = 5;
  35.         }        
  36.     }    
  37. }
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement