• Post Reply Bookmark Topic Watch Topic
  • New Topic

hi, i have an array question, this is probably really obvious (to everyone else other than me)  RSS feed

 
salpie Nowinski
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear you,

i am completely stuck, i wanted to make an array with both a string and an integer for each item is this possible? or would i have to parse half of them after into an integer and how do i do this?

thank you so much for your time!
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

So, you want to have an array, and each element should contain a pair of values (a string and an integer)? Create a class that holds these two values and then create an array of objects of your class. For example:

 
salpie Nowinski
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you ever so much!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!