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

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -