Skip to content

Instantly share code, notes, and snippets.

@lanfon72
Created October 3, 2014 03:37
Show Gist options
  • Select an option

  • Save lanfon72/6c5fe1a98009eb28f2e2 to your computer and use it in GitHub Desktop.

Select an option

Save lanfon72/6c5fe1a98009eb28f2e2 to your computer and use it in GitHub Desktop.
class Module {
String mModuleType;
String mModuleSubType;
public Module(String type, String subType) {
mModuleType = type;
mModuleSubType = subType;
}
//我也不知道裡面其他還有啥....
}
//↓↓ your code.
ArrayList<Module> mModule = new ArrayList<Module>();
Module module = new Module( );
module.mModuleType = "Schedule";
module.mModuleSubType = "Schedule";
mModule.add(module);
module.mModuleType = "Information";
module.mModuleSubType = "Information";
mModule.add(module);
//use constructor, replace as ↓↓↓
ArrayList<Module> mModule = new ArrayList<Module>();
mModule.add(new Module("Schedule", "Schedule") );
mModule.add(new Module("Information", "Information") );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment