下面是一段代码我变异的时候总是提示这样的信息:TestProCon.java:68:找不到符号
符号:Poper(Account4)
位置:类 PoperPoper poper = new Poper(account);
我不知道这是为什么,弄了半天也没弄好,只好向大家请教了,下面是我的源代码:
class Poper extends Thread
{
Account4 account;
public void Poper(Account4 account)
{
this.account = account;
}
public void run()
{
for(int i = 0;i<5;i++)
{
account.withdraw(100);
}
for(int j = 0;j<5;j++)
{
account.deposite(100);
}

}
}
//Account4.java
class Account4
{
double balance;
public Account4()
{
balance = 0;
System.out.println("Total money:" + balance);
}
public synchronized void withdraw(double money)
{
if(balance == 0)
{
try{
wait();
}catch(InterruptedException e){}
}
else if(balance<=money)
{
balance = balance-money;
System.out.println("withdraw 100 success!");
notify();
}
}
public synchronized void deposite(double money)
{
if(balance != 0)
{
try{wait();}
catch(InterruptedException e){}
}
balance = balance+money;
System.out.println("deposite 100 success");
notify();
}
}
class TestProCon
{
public static void main(String[] args)
{
Account4 account = new Account4();
Poper poper = new Poper(account);
poper.start();
}
}