java - ArrayList avalible everywhere in the project -


i looking implement arraylist avalible everywhere in project. want dynamicly add, delete elements, etc. of arraylist , send via retrofit.

any solution?

you can declare array static :

public static  list<string> myarray =  new arraylist<>(); 

you can access anywhere

myarray.add("test"); 

Comments

Popular posts from this blog

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -