面向对象思想小案例——银行存取款代码示例static类属性运用
package com.bank;
/**
* 银行存钱取钱工具类
*/
public class Account {
public static int money=0;
//存款方法
public boolean inCash(int cash){
boolean flag=false;
if(cash>0){
money+=cash;
flag=true;
原创
2017-09-07 15:16:52 ·
1387 阅读 ·
0 评论