Home » Tip Bank » Java
  • Comment on this Article
Language: Java
Expertise: Intermediate
Apr 30, 2020

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Watch

Cloning a Matrix in Java

Cloning a matrix in Java can be done via the clone() method, as below:

int [][] arr = new int[matrix.length][];
for(int i = 0; i      arr[i] = matrix[i].clone();
}
Octavia Anghel
 
Submit a Tip
Browse "Java" Tips
Browse All Tips
enable-javascript.com
codecademy.com