skip to main | skip to sidebar

T

2 synchronized methods in one object

If 2 different threads hit 2 different synchronized methods in an object at the same time will they both continue?  No. Only one method can acquire the lock.
Newer Post Older Post Home

About Me

lucyjava
View my complete profile

Blog Archive

  • ▼  2007 (106)
    • ►  September (19)
    • ►  July (42)
    • ▼  June (45)
      • case-insensitive string sort
      • SAX vs DOM
      • Singleton
      • Threads block on I/O
      • 2 synchronized methods in one object
      • Thread communication
      • daemon thread
      • synchronization level
      • thread, lock, monitor
      • yield vs sleep (thread)
      • Thread states
      • Creation of thread
      • Process/Thread
      • throw/throws
      • Best Practice for exception handling
      • Exception
      • PreparedStatement
      • Try-Catch-Finally
      • Joins: Innter, Outer,Equi, Natural..
      • garbage collector
      • type casting
      • Nested Classes
      • Inner classes
      • re-entrant, recursive and idempotent
      • stack and heap memory
      • final/finally/finalize()
      • final modifier
      • private constructor
      • static method
      • Static/Instance Variable
      • Java Object methods
      • shallow/deep clone
      • Improve IO performance
      • NIO
      • Java IO stream
      • Serialization
      • pass-by-reference vs pass-by-value
      • String vs StringBuffer/StringBuilder
      • Methods to override for HashMap key
      • Initial Capacity & Load Factor
      • Best Practices for Collections
      • Collection Framework
      • ArrayList, Vector, LinkedList
      • Overload
      • Override