Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

first steps!!

 
ranjan andrews
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello!! i am unable to display an array of objects,what i do have displayed are the memory location references contained the array.i tried the toString() method,but had the same result.i would appreciate some inputs on this thanks!!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64609
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What types of objects are in the array? Unless the objects have defined meaningful toString() methods, the default is to generate a unique string usually including a memory reference.
hth,
bear
 
Francis Siu
Ranch Hand
Posts: 867
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ranjan
i am unable to display an array of objects,what i do have displayed are the memory location references contained the array.i tried the toString() method
On every object instance,toString() method should be overrided in the object class which you define,so that it can display the meaningful information which you want to display.
In which you define the object class do the following to override the default one

HTH
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic