我有一個ArrayList正在使用Customer類填充客戶信息。在我的addCustomerRecord方法中,我在addCustomerRecord方法中調用findAddIndex,這樣輸入的數據將在顯示數據之前排序。這裏是我的代碼,不介意fileWhatever方法,我不使用它。 public class CustomerDemo
{
//arrayList of custom
我仍然在學習封裝。我有一個GrammarList,其中每個Grammar emcapsulated有一個陣列listRule與他們的所有setter &獲得者。因爲在這裏看到: public class Grammar {
private enum Type {Left, Right, NULL};
private String Nom;
private static Type type
我想創建一個使用for循環在我的MainActivity.java中的虛擬對象的ArrayList。這似乎是我得到我創建的每個對象的對象引用做工精細: for(int i=0; i < 10; i++){
new TaskObjects("Title " + i, "Category " + i, "Description " + i, i + 10);
Log.d("For