Results 1 to 4 of 4
  1. #1
    JavaUser241 is offline Member
    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0

    Default Creating array list with different data types.

    Hi all.

    Basically, I am trying to create an array list which takes different data types (like integers, booleans and strings).

    Thanks.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,250
    Rep Power
    19

    Default Re: Creating array list with different data types.

    Why?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    JavaUser241 is offline Member
    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0

    Default Re: Creating array list with different data types.

    I'm trying to make a table which contains details of university applicants which will contain their name (string) and age (integer) and so on...

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,250
    Rep Power
    19

    Default Re: Creating array list with different data types.

    That would suggest creating a class that encapsulates that data, and maintaining a List of instances of that class.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 3
    Last Post: 02-14-2012, 12:05 AM
  2. Creating an array with different data types
    By Rami in forum New To Java
    Replies: 18
    Last Post: 08-10-2011, 07:27 PM
  3. Storing Mutiple Classes/Data Types in a Linked List
    By Chronoattica in forum New To Java
    Replies: 7
    Last Post: 12-28-2010, 10:03 PM
  4. Comparing two data types in order to store in array
    By gwithey in forum New To Java
    Replies: 3
    Last Post: 05-01-2009, 10:27 AM
  5. Array of different data types?
    By venkatteshb in forum New To Java
    Replies: 1
    Last Post: 08-27-2008, 05:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •