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

What does system out println () do?

965


State some situations where exceptions may arise in java?

999


In a container there are 5 components. I want to display the all the components names, how will you do that one?

995


How many types of array are there?

951


What are the data types supported by java? What is autoboxing and unboxing?

932


Why super is first line in java?

996


What is method reference?

916


What are abstract methods in java?

1058


Write a program to print the pattern given below

885


What is the unit of plancks constant?

985


what is the difference between thread and runnable types? : Java thread

947


What is functional interface in java?

989


What is the difference between stream and buffer?

923


List some important characteristics on jre

1030


Can we have two methods in a class with the same name?

989