Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: ArrayIndexOutOfBoundsException in Shopping Cart Program...Where Did I go wrong?

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default ArrayIndexOutOfBoundsException in Shopping Cart Program...Where Did I go wrong?

    Solved
    I was creating an array with null as its length
    Last edited by orangeweapons; February 8th, 2012 at 04:31 PM.


  2. #2
    Member
    Join Date
    Dec 2011
    Location
    United States
    Posts
    94
    My Mood
    Amused
    Thanks
    5
    Thanked 8 Times in 8 Posts

    Default Re: ArrayIndexOutOfBoundsException in Shopping Cart Program...Where Did I go wrong?

    Make sure you are not trying to access items that are at negative or non-existent boundaries of the array. Instead of using regular arrays, why don't you try the Java Collection Framework? Good luck

Similar Threads

  1. Simple Shopping Cart..... not so simple
    By jpsider in forum What's Wrong With My Code?
    Replies: 5
    Last Post: January 20th, 2012, 01:18 PM
  2. Need help with simple Shopping cart math
    By I hate Java! in forum Loops & Control Statements
    Replies: 3
    Last Post: November 6th, 2011, 09:46 PM
  3. Shopping Program Willing to pay
    By ulikecourtney in forum Paid Java Projects
    Replies: 1
    Last Post: September 27th, 2011, 12:59 PM
  4. [SOLVED] ArrayIndexOutOfBoundsException
    By Elementality in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 18th, 2011, 06:39 PM
  5. Validating fields in a js shopping cart
    By rockc in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 10th, 2010, 02:37 PM