What is the difference between Synchronizing mehtod &
Synchronizing block?
Answer Posted / anjani kumar jha
In syncronizing block the object is locked.
In Syncronozing the method the method is
locked........means only one at a time only one thread can
use that method.
Thanks and Regards
Anjani Kumar Jha
9623154095
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
How long will it take to learn java?
What is difference between c++ and java ?
What are "methods" and "fields"?
State the main difference between c++ and java?
Is it possible to compare various strings with the help of == operator? What are the risks involved?
What are the four corner stones of oop?
Why does java doesnt suuport unsigned values?
public class Test { public static void main(String[] args) { int countA = 0; int countB = 0; int countC = 0; int countD = 0; int countE = 0; int countF = 0; int countG = 0; int countH = 0; int countI = 0; int countJ = 0; int countK = 0; int countL = 0; int countM = 0; int countN = 0; int countO = 0; int countP = 0; int countQ = 0; int countR = 0; int countS = 0; int countT = 0; int countU = 0; int countV = 0; int countW = 0; int countX = 0; int countY = 0; int countZ = 0; } } Can anybody tell me any alternate solution(like loop or something) to automate this initialization process. Ex:- for(char chr='A';chr<='Z'; chr++) { (int) String "count"+chr = 0; }
What is the char data type?
What is a Presistent Object?
What is meant by the value of a variable?
What is a finally block? Is there a case when finally will not execute?
What is the use of :: in java?
What mechanism does java use for memory management?
Can a top level class be private or protected?