Advertisement
sergAccount

Untitled

Sep 18th, 2016
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.86 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 helloworld;
  7.  
  8. /**
  9.  * Ctrl + S   - сохранение и компиляция кода  
  10.  * Shift + F6 - выполнение текущего файла
  11.  *
  12.  *
  13.  * @author Student1
  14.  */
  15. public class HelloWorld {
  16.  
  17.     /**
  18.      * @param args the command line arguments
  19.      */
  20.     public static void main(String[] args) {
  21.         // TODO code application logic here        
  22.        
  23.         // sout + tab                        
  24.         //System.out.println("Hello World!");        
  25.         //System.out.println("Hello World222222!");
  26.        
  27.         // объявляем переменную
  28.         boolean b;
  29.         boolean a;
  30.         boolean c;        
  31.         // присваиваем значение переменной
  32.         b = false;
  33.         System.out.println("b=" + b);
  34.        
  35.         // присваиваем значение переменной
  36.         b = true;
  37.         System.out.println("b=" + b);
  38.        
  39.         // > < >= <=
  40.         b = 10>20;
  41.         System.out.println("b=" + b);        
  42.        
  43.         b = 20>10;
  44.         System.out.println("b=" + b);        
  45.        
  46.         a = true;
  47.         // оператор сравнения: ==
  48.         c = (a==b);
  49.         System.out.println("c=" + c);
  50.        
  51.         int i;
  52.         i = 100;        
  53.         int i1 = 101;
  54.        
  55.         System.out.println("i=" + i);
  56.         System.out.println("i1=" + i1);
  57.        
  58.         double value = 20.056;
  59.         System.out.println("value=" + value);
  60.        
  61.         // +, -, *, /, % - опертаторы для работы с числовыми типами        
  62.         long nameOfParam = 16;
  63.     }    
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement