sergAccount

Untitled

Jan 31st, 2021
677
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.ja6;
  7.  
  8. /**
  9.  *
  10.  * @author Admin
  11.  */
  12. public class Main {
  13.    
  14.     //
  15.     public static boolean test(int i){
  16.         return true;
  17.     }
  18.     //
  19.     public static void main(String[] args) {
  20.         // Цикл for each
  21.         int[] array = {10, 20};
  22.         // fori + tab
  23.         for (int i = 0; i < array.length; i++) {
  24.             System.out.println(array[i]);
  25.         }
  26.         // for each
  27.         System.out.println("for each");
  28.         for (int a : array) {
  29.             System.out.print(a + " ");
  30.         }
  31.         System.out.println("EX1");
  32.         boolean[] arr = {true, false, false, true};
  33.         for (boolean value : arr) {
  34.             if (value) {
  35.                 System.out.println(value);
  36.             }
  37.         }
  38.         if(test(2)){
  39.             System.out.println("YESSSSSSSSSSSSSSSSSSSSSS!!!!");
  40.         }
  41.     }
  42. }
  43.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×