arraylist - How replace one list items with another in java? -


i have 2 array lists, can possible replace 1 list items second list.

arraylist<string> = new arraylist<string>(); arraylist<string> b = new arraylist<string>(); a.add("testone"); a.add("testtwo"); a.add("testthree"); b.add("demoone"); b.add("demotwo"); system.out.println("list values are: "+ a); 

is there way replace first list second list elements. if print first array list, should print following output

[demoone, demotwo]  

i guess need:

a = b; system.out.println("list values are: "+ a); 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -