Thread: Class help
View Single Post
  #31 (permalink)  
Old 11-15-2007, 08:08 AM
Shaolin Shaolin is offline
Member
 
Join Date: Nov 2007
Posts: 37
Shaolin is on a distinguished road
Thanks. Well I did manage to get it to work but the results ouputted werent what I expected.

Here is what I have in main:

Code:
System.out.println( accs[0].Print() );
In my Account Class:

Code:
public String Print(String n) { // Print return ( "User Name: " + name + " Account: " + accNo + " balance: " + totalbalance + ")" ) ; }
I should get something like:

Quote:
User Name: Jack Account: 1121921 balance: 12313.12
But instead I'm getting:

Quote:
Account@190d11
I have a feeling that it has something to do with this line:
Code:
public String Print(String n)
Reply With Quote