Results 1 to 2 of 2

Thread: Can we add integer, float objects while using collections

  1. #1
    Geek_Guest
    Guest

    Can we add integer, float objects while using collections

    When using Collections, can we add the Integer, Float objects. ie., how to convert the objects in Vector / ArrayList to an Integer or Float etc.

    Question asked by visitor vimalraj


  2. #2
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    Re: Can we add integer, float objects while using collections

    Using wrapper class you can add and retrieve the data from Vector/ArrayList.

    For example when Retrieving you can use like this....
    int x = (Integer)myintList.get(i);

    -----------------------
    suresh


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact