Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ProuductList {
- private ArrayList<String> productList = new ArrayList<>;
- public void populateList() {
- productList.add("123");
- productList.add("456");
- }
- public ArrayList<String> getProductList() {
- return productList;
- }
- }
- public class InvenDriver {
- private ProductList productList;
- public InvenDriver() {
- productList = new ProductList();
- productList.populateList();
- //To use the list productList.getProductList();
- }
- }
Add Comment
Please, Sign In to add comment