Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package com.mycompany.ja6;
- /**
- *
- * @author Admin
- */
- public class Main {
- //
- public static boolean test(int i){
- return true;
- }
- //
- public static void main(String[] args) {
- // Цикл for each
- int[] array = {10, 20};
- // fori + tab
- for (int i = 0; i < array.length; i++) {
- System.out.println(array[i]);
- }
- // for each
- System.out.println("for each");
- for (int a : array) {
- System.out.print(a + " ");
- }
- System.out.println("EX1");
- boolean[] arr = {true, false, false, true};
- for (boolean value : arr) {
- if (value) {
- System.out.println(value);
- }
- }
- if(test(2)){
- System.out.println("YESSSSSSSSSSSSSSSSSSSSSS!!!!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement