java access an object in different threads
问题 I have searched a lot but not able to find particular solution. There are also some question regarding this on stackoverflow but i am not able to find satisfactory answer so i am asking it again. I have a class as follow in java . I know how to use threads in java. //please do not consider syntax if there is printing mistake, as i am typing code just for showing the concept in my mind public class myclass{ private List<String> mylist=new ArrayList<String>(); public addString(String str){ /