Hi Renu! I think method variables are more efficient as there scope are limited,they get created only when they required and get destroyed as method scope reaches but the same point is responsible for the major disadvantage of global usage!
Originally posted by Renu Radhika: using member varibles or method variables which is more efficient for performance
This is not uniformly so. If you have constant data germane to various member functions, you might want to declare the data as a static instance variable. In this way, only one copy of the data is made when the class is loaded.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop