Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about Thread-safe

 
Wilson Hui
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is java.lang.Integer.parseInt(String s) thread-safe?
If not, how to make it to be thread-safe?
Thanks
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wilson
What do you mean by thread safe? The method does not change anything or alter any of the variables involved so it can't be involved in any kind of deadlock situation. All it does is return an int that is represented in the passed in String.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic