N
Nagrik
Hello Group,
Can the "synchronized" kew word be used in front of data members. I
am aware that it can be used in fron of methods, and a block.
Something like this.
public class myclass {
synchronized prinvate int counter; // Is it allowed
}
If the answer is yes then in what situation it is adviseable.
Thanks in advance..
nagrik
Can the "synchronized" kew word be used in front of data members. I
am aware that it can be used in fron of methods, and a block.
Something like this.
public class myclass {
synchronized prinvate int counter; // Is it allowed
}
If the answer is yes then in what situation it is adviseable.
Thanks in advance..
nagrik