<<< Object Members vs. Class Members | Index | Non-static Member Example >>> |
public class SavingsAccount { private float balance; private static float minBalance; private boolean overdrawn; public void deposit( float amount) { balance += amount;} // Static method can only access // static members of of its class: public static void changeMinBalance( float newMin ) { minBalance = newMin; }//changeMinBalance }//class SavingsAccount
<<< Object Members vs. Class Members | Index | Non-static Member Example >>> |