This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
First of all instansiating an object is not required to access the static var because static vars are class variables. You can instansiate an object and use it if you wish and can also use the classname.staticvariable eg. double bonus = Commission.salesFigure * Commission.commRate; But in your code both the method and variable the method acts upon is in the same code so in there you can simply use the var name as you have used. Though you can use the classinstance.staticvar convention (using class instance to refer to the static var) but its not recommended and its much better to use classname.staticvar(using class name to refer to the static var). [ May 16, 2003: Message edited by: Anupam Sinha ]