What is the difference between static synchronize() metod
and synchronize() method?

Answer Posted / suresh m

Non static synchronized method enables Object's Object Lock for the given Thread
while static synchronized method enables Class's Class Lock for given Thread

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many bytes is a unicode character?

750


Why we go for collections in java?

770


How to display all the prime numbers between 1 and 100

728


what is the difference between future and callable interface in java?

889


Is empty string in java?

839


What is java reflection api?

774


Write a factorial program using recursion in java?

724


What are three ways in which a thread can enter the waiting state in java programming?

923


Explain importance of throws keyword in java?

778


what is daemon thread and which method is used to create the daemon thread? : Java thread

761


Write a program to search a number in the given list of numbers.

845


Write a java program to find the route that connects between Red and Green Cells. General Rules for traversal 1. You can traverse from one cell to another vertically, horizontally or diagonally. 2. You cannot traverse through Black cells. 3. There should be only one Red and Green cell and at least one of each should be present. Otherwise the array is invalid. 4. You cannot revisit a cell that you have already traversed. 5. The maze need not be in the same as given in the above example

2341


What happens when main () method is declared as private?

863


What is the largest number a double can hold?

796


what is object-oriented programming in java?

812