Latest News

 










Quiz

Previous slide Next slide Back to first slide View graphic version


Quiz


 
My other sites

Latest News

 










Quiz

  • Imagine that one thread, T1, needs to access two objects (one file for writing banking data, and a String that contains the balance). These two objects are declared Synchronized, so that no other thread can access these objects at the same time. A second thread, T2, runs in parallel with T1 and needs to access the same objects too. While T1 locks the file (but not the String), T2 manages to lock the String, but not the file. What happens next?

Previous slide Next slide Back to first slide View graphic version