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
What is a null check?
What is a bubble sort in java?
What is the default value of an object reference declared as an instance variable?
What is java used for?
What is the meaning of variable in research?
What is java basic concept?
Are strings immutable in java?
How do you override a variable in java?
What is return code?
Explain notifyall() method of object class ?
Why for each loop is used?
What is a final class in java?
Why are getters and setters used?
How can we create an immutable class in java?
Is array a class in java?