📜  如何以特定格式打印数组列表 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:47.352000             🧑  作者: Mango

代码示例1
public void load() {

  System.out.println("");
  System.out.println("Subject: "+subjectString);
  System.out.print("Homework Mark: \t");

  for(int i = 0; i <= arrayList1.size()-1; i++){
      System.out.print(arrayList1.get(i) + "\t");
   }

   System.out.println("");
   System.out.print("Exam Mark: \t");
   for(int i = 0; i <= arrayList2.size()-1; i++){
      System.out.print(arrayList2.get(i) + "\t");
   }
   System.out.println("");
}