If your team member writes code with lots of static
variables and static methods, will it cause any side effects?
Answer Posted / eknath wagadre
Yes!!! We can define the several static method and variable
and those are vary easy to access by Class Name or by class
instance.
But Only problem with static method and variable is that
there is Maximum chance of data corruption. bcz of static
method and variable are accessed by diff-2 thread at the
same time. Mean at the same time one or more then one thread
can change the value of static variable.
So conclusion is this if we can define more static variable
and method so and our program have hug line of code at that
time programs output may be inconsistent.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do you convert int to char in java?
What are white spaces in java?
What is difference between local variable and global variable?
What is the difference between Error, defect,fault, failure and mistake?
What is locale in java?
What is garbage collection? What is the process that is responsible for doing that in java?
What type of variable is gender?
How do you change an int to a string?
Where import statement is used in a java program?
What is predicate in java?
How list contains works in java?
What are the benefits of operations?
What is use of valueof () in java?
Does java trim remove newline?
Explain an intermediate language?