Skip to main content

Posts

Showing posts with the label Java

Matrix Calculation by Java

package mypack; import java.util.Scanner; public class Matrix {     private int row;     private int col;     private int[][] matrix;     public Matrix(int trow, int tcol) {         this.row = trow;         this.col = tcol;     }     public Matrix(int trow, int tcol, int[][] m) {         this.row = trow;         this.col = tcol;         this.matrix = m;     }     public int[][] fill(){         int[][] data = new int[row][col];         Scanner input = new Scanner(System.in);         for(int row = 0; row< matrix.length; row++){           ...