1. Are you ready for the Galaxy S20? Here is everything we know so far!

Return multiple varibles

Discussion in 'Android Development' started by KarneeKarnay, Mar 12, 2016.

  1. KarneeKarnay

    KarneeKarnay Newbie
    Thread Starter

    Hi Guys,

    I a need to create two ArrayLists that contain different sets of information. Is it possible to return more than one variable or should I return a holder with both variables within it?
     


  2. Deleted User

    Deleted User Guest

    A method can only return one object or primitive value (int etc.)
    So as you say, the way to return multiple ArrayLists would be to use a 'holder' object.
     
Loading...
Similar Threads - Return multiple varibles
  1. App Update
    Replies:
    0
    Views:
    121
  2. Nirhan
    Replies:
    2
    Views:
    136
  3. ScttLee184
    Replies:
    10
    Views:
    481
  4. Re_D1234
    Replies:
    0
    Views:
    605
  5. MiniBoatin
    Replies:
    8
    Views:
    1,294
  6. beirou
    Replies:
    1
    Views:
    263
  7. notableuser
    Replies:
    10
    Views:
    928
  8. Raksha Agrawal
    Replies:
    0
    Views:
    620
  9. Tdjohnson7700
    Replies:
    22
    Views:
    6,421
  10. Stacey cogswell
    Replies:
    13
    Views:
    515

Share This Page

Loading...