Advertisement
sergAccount

Untitled

Aug 16th, 2020
923
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.76 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.app12;
  7.  
  8. /**
  9.  *
  10.  * @author Admin
  11.  */
  12. public class ArrayUtil {
  13.    
  14.     // 1) метод выводит элементы двумерного массива в виде таблицы
  15.     public static void printArray(int[][] array, String delim){
  16.         //
  17.         for(int i = 0; i < array.length; i++) {            
  18.             for (int j = 0; j < array[i].length; j++) {
  19.                 System.out.print(array[i][j]);
  20.                 System.out.print(delim);                
  21.             }
  22.             System.out.println();
  23.         }
  24.     }    
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement