hi there,
In order to Complete a task sheet for College, i have to create a media Library
filled with information such as : First Name, Last Name, Artist, Audio length, etc. (just the info).
i thought i would create a Container Class in which I'd fill in all the info, using another Class (Information Class)
this is where i am right now:
import java.util.ArrayList; public class Container { public static void main(String[] args) { } ArrayList<String> Names = new ArrayList<>(); public void addinfo(String addinfo) { Names.add(addinfo); } }
but i don't know how to grab the method into the other class and use it from there to fill it.
we are allowed to use java.util and java.lang, prompted to use the ArrayList for the Container.
PS: Feedback on my way of handling the task would be Highly Appreciated.
Thanks in advance