which one is the best practice using synchronization method
or synchronization block

Answer Posted / prajakta lakhe

synchronization block is the best practice to implement
synchronization. It allows us to synchronize the method whose
source code we dont know. and also this style helps us to
synchronize the particular block of code,where multiple
processes or threads can use a single resource at a time.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

4. What is the need of START 0? Instead if can we use any other numeric? If we use what will happen?

1891


how many types of bytes are there???

1979


why not instantiating servet using new operator?

1491


What is the difference between DECISION COVERAGE(DC) and MODIFIED CONDITION/DECISION COVERAGE(MCDC)?

1770


What is the use of sas software? Is sas and sap are different?

1009






Please forward important interview and basic questions in VB6 on my email id: usneha_16@yahoo.co.in

1569


design a counter with the following repeated binary sequence: 0, 1, 2, 3, 4, 5, 6, 7, 8 using JK Flip Flop.

16216


what is the difference between Windows application and Unix application?

2154


Write a function which accepts a sentence as input parameter.Each word in that sentence is to be reversed. Space should be there between each words.Return the sentence with reversed words to main function and produce the required output. for eg:- i/p: jack jill jung kill o/p: kcaj llij gnuj llik

1750


Busy waiting is a method whereas a taskwaits for a given event by continiously checking for an event to occur. What is the main problem with this approach

1409


which book we learned this mantis? how many version are realsed this mantis upto now?

1419


write a query that returns one row for each department and the number of employees in that department. Given two tables EMPLOYEE and DEPARTMENT, where there can be multiple employees per department.

1175


What is the meaning of client-server application. The purpose of Client-Server Application. with description.

1651


what is best way to create a Thread class & why?

1584


Given a Binary Search Tree, write a program to print the kth smallest element without using any static/global variable. You can?t pass the value k to any function also.

552