I have a small problem in one method's return value.
Although I manage to get the correct author and title when looking at author and title variable content the method only returns the reference to the linkedlist, just gibberish... If anyone can point out how to fix this it will be greatly appreciated.
What do you mean by the method returns "gibberish"?
leroy tsruya
Ranch Hand
Joined: Sep 24, 2009
Posts: 57
posted
0
i assume you try to do print to the console a Song object.
when printing to th console using System.out.print for example, you use the toString method of the class.
so you will have to override the toString method of your song class (which inherited from the Object class).
just add this method to your Song class.
as:
or whatever you choose.
i assumed you have getAuthor and getTitle methods to return the author name and title in the song class.
Hope it helped
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.