Transpose a 2d Array with varying dimensions in Java
问题 Hey I'm trying to transpose a 2d Array who's rows/columns are inputted by the user. I've looked around on this site and pretty much all the advice I see is for square arrays (2x2,3x3, etc...) this is what I have so far import java.util.Scanner; public class ArrayTranspose { public static void main(String[] args) { Scanner kb = new Scanner(System.in); System.out.print("Input the number of rows (must be between 2 and 5): "); int rows = kb.nextInt(); if ((rows < 2) && (rows > 5)) { System.out