• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread adding doubles to an ArrayList in a different class

 
Gustavo Berndorfer Goldhardt
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, this is my first time using Threads so I'm a bit confused. My problem: There is a class (lets call it The_Class), this class have an ArrayList of doubles. I need a Thread to add doubles in The_Class's list while The_Class continues executing the rest of its code... Is this possible? If yes, can someone show me how to do it?

Thank you very much!
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, start a new thread from a main thread and add values in to arraylist hence main thread keep on execute in different flow
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gustavo Berndorfer Goldhardt wrote:Hi all, this is my first time using Threads so I'm a bit confused. My problem: There is a class (lets call it The_Class), this class have an ArrayList of doubles. I need a Thread to add doubles in The_Class's list while The_Class continues executing the rest of its code... Is this possible? If yes, can someone show me how to do it?

Thank you very much!

Check whether it suits you or not...

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic