class with objects compile error in Java 1.5.0 and 1.4.2.05

Hi, I have some problems with creating objects to my java program.

See below:

/*

JAVA, creating new class object.

*/

class AccountTest {

public static void main(String[]args) {

Account olesAccount = new Account(123456676756L, "Ole Olsen", 2300.50);

olesAccount.deposit(1000.0); //Input of 1000$ to account

double balance = olesAccount.findBalance(); //Ask object about balance!

System.out.println("Balance: " +balance);

}

}

/*

ERRORS, from compiler (javac):

AccountTest.java:7: cannot find symbol

symbol : class Account

location: class AccountTest

Account olesAccount = new Account(123456676756L, "Ole Olsen", 2300.50);

^

AccountTest.java:7: cannot find symbol

symbol : class Account

location: class AccountTest

Account olesAccount = new Account(123456676756L, "Ole Olsen", 2300.50);

^

2 errors

*/

/*

This error occurs with both java 1.5.0 RC and 1.4.2.05

*/

[1040 byte] By [Kevin_a_v] at [2007-9-30 16:57:30]
# 1

Assuming you haven't forgotten to compile the Account class, tt seems to be a problem with visibility. Are you sure your classpath is set up correctly and that the class Account is visible to the AccountTest driver?

I'd try moving the Account out of whatever package it's in right now and making it public. Then, restrict acces from there.

Greyhill at 2007-7-6 13:11:16 > top of Java-index,Administration Tools,Sun Connection...
# 2
Or add: import <package>.Account;- Steev.
steevcoc at 2007-7-6 13:11:16 > top of Java-index,Administration Tools,Sun Connection...
# 3
Problem solve I had to build a class called account with the functions i needed... sorry Im a java neewb.. so problem soved!
Kevin_a_v at 2007-7-6 13:11:16 > top of Java-index,Administration Tools,Sun Connection...