Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

basic

 
sudheer singampalli
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to Java.
plz tell me what a "thread-safe" program means.
 
Amol Takate
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In simple words a thresd safe class or object means there is only one thread inside a object at a given point in a time.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amol --
No, not really, that isn't what it means.
"Thread-safe" means quite the opposite, really: it means that multiple threads can access a single resource simultaneously without harm.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic