Thread: Class help
View Single Post
  #32 (permalink)  
Old 11-15-2007, 08:26 AM
hardwired hardwired is offline
Senior Member
 
Join Date: Jul 2007
Posts: 1,266
hardwired is on a distinguished road
This
Code:
System.out.println( accs[0].Print() );
is calling a no-argument method Print.
Your Account class Print method takes a String argument. Unless it has a no-argument Print method you should get a compile error.
This
Code:
Account@190d11
looks like the hex address of the actual object in memory which you would get if you did something like this:
Code:
System.out.println(accs[0]);
Reply With Quote