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 generics work?
What is anagram word?
How many bits is a float?
What is meant by memory leak?
Explain the importance of join() method in thread class?
What is the generic function?
What is anti pattern in programming?
What is the difference between superclass and subclass?
What is import java util arraylist?
How to solve the problem of generating the unique hash keys with hash function?
What java is used for?
What are the 6 boolean operators?
What is literal example?
What is an object class?
How many types of methods are there in java?