Results 1 to 4 of 4

Thread: ArrayList.set (should be easy)

  1. #1

    Thread Starter
    Hyperactive Member Sneeden's Avatar
    Join Date
    Oct 2001
    Location
    Sneedville
    Posts
    258

    ArrayList.set (should be easy)

    What am I doing wrong?


    int valin;
    int valthis;

    //init int vars

    p_Coef.set(x, Integer(vthis + vin));

  2. #2
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    p_Coef.set(x, Integer(vthis + vin));

    Its seems you are creating an new Integer object without using new
    Last edited by Dilenger4; Sep 18th, 2003 at 12:32 AM.

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Looks like a likely error from someone coming from C++...

    p_Coef.set(x, new Integer(vthis + vin));
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4

    Thread Starter
    Hyperactive Member Sneeden's Avatar
    Join Date
    Oct 2001
    Location
    Sneedville
    Posts
    258
    Thanks for you help guys. I solved the problem right after I posted. Figures, huh?

    Cornered Bee,
    I am using Java for school. I do have experience with other languages, not too much with C++ though. I have used Java more, that is for sure. I have the most exp with Basic languages, so my mind does not default to full OOP (gotta retrain my brain).

    Thanks for the help fellas.

Posting Permissions

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



Click Here to Expand Forum to Full Width