canot find class name? whats wrong?
//=======================================================
// Changes the name on the account
//=======================================================
publicvoid name(String newName)
{
name = newName;
}
public String getName()
{
return name;
}
publicvoid writeOutput()
{
System.out.println("Name: " + name);
}
the above is part of my class and my objective is to change a name, but i get an error, any advice?
//change the name on Joe's account to Joseph
acct2=new name("Joseph");
[1163 byte] By [
MEGSPAULa] at [2007-10-3 8:25:57]

Here is the class.
//========================================================
//Account.java
//
// A bank account class with methods to deposit to, withdraw from,
// change the name on, charge a fee to, and print a summary
// of account.
//=======================================================
import java.text.NumberFormat;
public class Account
{
private double balance;
private String name;
private long acctNum;
private final double fee=15.00;
//=======================================================
//Constructor -- initializes balance, owner, & account#
//=======================================================
public Account(double initBal, String owner, long number)
{
balance=initBal;
name=owner;
acctNum=number;
}
//=======================================================
// Checks to see if balance is suffiecient for withdrawal.
// If so, decrements balance by amount; if not, prints
// message.
//=======================================================
public void withdraw(double amount)
{
if (balance >=amount)
balance-=amount;
else
System.out.println("Insufficient funds");
}
//========================================================
// Adds deposit amount to balance.
//========================================================
public void deposit(double amount)
{
balance+=amount;
}
//========================================================
// Returns balance.
//========================================================
public double getBalance()
{
return balance;
}
//============================================================
// Returns a string containing the name, account# and balance
//============================================================
public String toString()
{
NumberFormat fmt=NumberFormat.getCurrencyInstance();
return(acctNum + "\t" + name + "\t" + fmt.format(balance));
}
//=======================================================
// Deducts $10 service fee
//=======================================================
public void chargeFee()
{
balance=balance-fee;
}
//=======================================================
// Changes the name on the account
//=======================================================
public void name(String newName)
{
name = newName;
}
public String getName()
{
return name;
}
}
//===============================================================
// ManageAccounts.java
//
// Use Account Class to create and manage Sally and Joe's
// bank accounts
//==============================================================
public class ManageAccounts
{
public static void main(String[]args)
{
Account acct1, acct2;
//create account 1 for Sally with $1000
acct1= new Account(1000, "Sally", 1111);
//creat account 2 for Joe with $500
acct2= new Account(500, "Joe", 2222);
//deposit $100 to Joe's account
acct2.deposit(100);
//print Joe's new balance (use getBalance())
System.out.println("Joe's balance is: " + acct2.getBalance());
//withdraw $50 from Sally's account
acct1.withdraw(50);
//print Sally's new balance (use getBalance())
System.out.println("Sally's balance is: " + acct1.getBalance());
//charge fees to both accounts
acct1.chargeFee();
acct2.chargeFee();
//change the name on Joe's account to Joseph
acct2= new name("Joseph");
//print summary for both accounts
System.out.println(acct1);
System.out.println(acct2);
}
}
error isline 39 in second part [cannot find symbol class name]