• Post Reply Bookmark Topic Watch Topic
  • New Topic

Having trouble getting string object into one array and then in to another  RSS feed

 
Kip Bodey
Ranch Hand
Posts: 43
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is part of a larger project but i figure if i can figure out this first step i can work the rest. I need to get a title from the user add it to a object array (i think thats what it is) and then when i call listAllItems(), items[] should be copied into a string array called listAllItems, and then printed, but currently im jusst having trouble i think making it an object and then make it an item in the items[], if i run case 3 the list it says null, whats going on any help would be so appreciated


 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kip Bodey wrote:if i run case 3 the list it says null, whats going on any help would be so appreciated

On line 76 you create a new MediaItem instance and on line 78 you call its getTitle method, but you don't ever set a title for it, therefore it returns the default value for the title variable which is null.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!