Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How do you convert int to char in java?

1070


What are white spaces in java?

1041


What is difference between local variable and global variable?

1016


What is the difference between Error, defect,fault, failure and mistake?

1202


What is locale in java?

1017


What is garbage collection? What is the process that is responsible for doing that in java?

1103


What type of variable is gender?

987


How do you change an int to a string?

998


Where import statement is used in a java program?

1123


What is predicate in java?

1055


How list contains works in java?

980


What are the benefits of operations?

946


What is use of valueof () in java?

1049


Does java trim remove newline?

982


Explain an intermediate language?

966