I have a private ArrayList in a class and I'd like to be able to access it outside of this class, what would be the proper way to do this? Right now I've just made the ArrayList public but I would like to allow it to be private. Should I just create a new ArrayList in my Main and pass it to the private ArrayList method to populate it and return it or is there a better way?

One way is to have accessor (get/set) methods in the class that owns the arraylist.
If you are going to populate it in another method, have that method create it, populate it and return it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.