Logical Error in if else statement in java
问题 My code: import org.ujmp.core.Matrix; import org.ujmp.core.SparseMatrix; public class part { public static void main(String args[]) throws Exception{ Matrix Bigomega=Matrix.Factory.zeros(6,6); Matrix omega = SparseMatrix.Factory.zeros(6, 6); int []timea={1,2,3,4,5,6}; int [] timeb={3}; int k1=0,k2=0; while (k1 < timea.length && k2 < timeb.length ) { if (timea[k1] < timeb[k2]) { omega.setAsInt(1, k1, k1); omega.setAsInt(-1, k1, k1 + 1); omega.setAsInt(-1, k1 + 1, k1); omega.setAsInt(1, k1 + 1,