高手帮忙看看这个java程序运行不出来

来源:百度知道 编辑:UC知道 时间:2024/05/16 16:11:02
高手帮忙看看为何我的这个java程序运行不了阿
我是初学者不大懂
帮帮忙啊

package org.netbeans.BankTest;

public class Test {

/** Creates a new instance of Test */
public Test() {
}

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
BankAccount one=new BankAccount("ZhangSan",500);
BankAccount two=new BankAccount("LiSi",1000);
BankAccount three=new BankAccount("WangWu",1500);

one.deposit(250);
two.withdraw(300);

System.out.println(one);
System.out.println(two);
System.out.println(three);

}

}

class BankAccount
{
private static int LAST_ACCOUNT_BANK=0;
private int accountNumber;
privat

试试看 应该可以了

package com.qhit.a;
import javax.naming.InsufficientResourcesException;

import com.qhit.a.BankAccount.InsufficientFundsException;

import sun.security.krb5.internal.crypto.e;

public class Test {

/** Creates a new instance of Test */
public Test() {
}

/**
* @param args
* the command line arguments
* @throws InsufficientFundsException
* @throws InsufficientFundsException
*/
public static void main(String[] args) throws InsufficientResourcesException, InsufficientFundsException {
// TODO code application logic here
BankAccount one = new BankAccount("ZhangSan", 500);
BankAccount two = new BankAccount("LiSi", 1000);
BankAccount three = new BankAccount("WangWu", 1500);

one.deposit(250);

two.withdraw(300);//注释以后也可以运行 看看结果 对比一下

System.out.println(