Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

transpose array in java

//creating a matrix  
int original[][]={{1,3,4},{2,4,3},{3,4,5}};    
    
//creating another matrix to store transpose of a matrix  
int transpose[][]=new int[3][3];  //3 rows and 3 columns  
    
//Code to transpose a matrix  
for(int i=0;i<3;i++){    
for(int j=0;j<3;j++){    
transpose[i][j]=original[j][i];  
}    
}    
Comment

PREVIOUS NEXT
Code Example
Java :: create and populate list one line java 
Java :: Java program to find which department has highest placement program 
Java :: javafx line chaart duplicate series added 
Java :: java.lang.stackoverflowerror null onetomany 
Java :: Hibernate/JPA criteria query 
Java :: overwrite confguration value spring 
Java :: find min max and average arraylist 
Java :: calculate values of array 
Java :: convert subarray to list java 
Java :: who was the mother of thomas elva edison 
Java :: how to find length of string array java 
Java :: Returning an Array from a Method 
Java :: spring down load 
Java :: can you automate mouseclicks with java 
Java :: dividing numbers using method 
Java :: bf5 cheat detector 
Java :: number pattern in java 
Java :: how to check if rs next is null 
Java :: Artemis agent/client auto failover 
Java :: sartt timer of 40 second when send otp andrpid 
Java :: Detect a face using OpenCV in Java 
Java :: Kotlin is like java 
Java :: stack push java 
Java :: entry constructor java 
Java :: java Optional to Collection 
Java :: vec add to text field java 
Java :: does not have a NavController set on 21312310 kotlin 
Java :: how to put all words from a file in an array java 
Java :: java running sum 
Java :: change password swing gui 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =