Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

smart ways to print a matrix in java

//first method::
for(int i=0;i<n;i++)
  	System.out.println(Arrays.toString(matrix[i]));

//second method::

java.util.stream.IntSteam
  				.range(0,n)
  				.forEach(i->System.out.println(Arrays.toString(matrix[i])));

//code by dungriyal
 
PREVIOUS NEXT
Tagged: #smart #ways #print #matrix #java
ADD COMMENT
Topic
Name
1+8 =