mình có đoạn code này:
public class SubjectManagement {
public static void main (String [] args){
int size = 0;
Scanner inputData = new Scanner (System.in);
System.out.print("nhap so mon hoc ");
size = inputData.nextInt();
System.out.print("\n thong tin mon hoc: ");
Subject [][] listSubject = new Subject [100][100];
for (int i = 0; i<= size; i++){
System.out.print("mon hoc thu " + (i+1));
for (int j = 0; j<= 3; j++){
System.out.print("Ma mon hoc: ");
listSubject[i][j] = inputData.nextLine();
System.out.print("ten mon hoc: ");
.....
}
}
cho mình hỏi sao lại lỗi ở đoạn listSubject[i][j] = inputData.nextLine(); nhỉ ? cảm ơn các bạn
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?