<<< Static Member Example | Index | Client's View of Static Members >>> |
public class SavingsAccount { // Non-static method can access both // static and non-static members of its class: public float withdrawal( float amount ) { if ( balance > amount ) { if ( balance - amount < minBalance ) { overdrawn = true; } balance -= amount; return amount; } else { return 0.0; } }//withdrawal }//class SavingsAccount
<<< Static Member Example | Index | Client's View of Static Members >>> |