Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to print array in one line in java

import java.util.*;
public class Main
{
   public static void main(String[] args)
   {
      int[][] array = {{1, 2, 3, 4}, {5, 6, 7, 8}};
        System.out.println(Arrays.deepToString(array));
   } 
}
Comment

printing different lines in array java

1,2,3,4,5

6,7,8,9,10

11,12,13,14,15

16,17,18,19,20

21,22,23,24,25
Comment

PREVIOUS NEXT
Code Example
Java :: why are string immutsble in java 
Java :: find first and last position of element in sorted array 
Java :: priority queue java 
Java :: java integer object to char 
Java :: tostring java 
Java :: declaration in java 
Java :: what is stringbuilder used for in java 
Java :: how to find lcm of two numbers java 
Java :: android recyclerview pull to refresh 
Java :: spring boot send api request 
Java :: how to add random numbers to an array 
Java :: terminate function calling in java 
Java :: how to check size of arrayin java 
Java :: java to kotlin converter android studio 
Java :: encryption 
Java :: CORS with Spring Boot 
Java :: Error: Could not find or load main class Hello Caused by: java.lang.ClassNotFoundException: Hello studio visual code 
Java :: How to remove an element from a Java List? 
Java :: Java short Keyword 
Java :: prime factors of a number 
Java :: " meaning in java 
Java :: how to call the main method in java 
Java :: using for loop to search for an input java 
Java :: android java how to show progressdialog in fragment 
Java :: plug and chug 
Java :: list in list 
Java :: how to solve CopyBuffer from HiLo failed, no data 
Java :: Picked up _JAVA_OPTIONS: -Xmx256M intillij 
Java :: java connect socket to POP3 
Java :: constraint layout not matching parent in netsted scrollview 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =