Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Sunil Garg   on Jun 29 In Java Category.

  
Question Answered By: Fred Hicks   on Jun 29

And does it apply on input parameters as well? For example, if I have
something like that:

public static  void modifyHashMap(HashMap map)
{
map.clear();
map.put("key", "value");
}

Is it still thread safe or not? I mean, if more threads  call this
method concurently, will each of them modify its own map?

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Thread-safe static methods Or get search suggestion and latest updates.


Tagged: