I have created several objects of a custom class and assigned them different attributes. I have then added each of those objects to a vector but when i try to output the elements of the vector, all i get are references to the objects and not the object attributes.
I have created several objects of a custom class and assigned them different attributes.
Share
You can access them with the enhanced
forloop:Or by using
elementAt(position):Or finally, override the
toString()method and use: