new to java world, just learning. help me with this problem i am struck up.
I am trying to write a program that multiplies two large integers.
here is my code but i am getting array index out of bounds.
just let me know how to resolve that arrayindex out of bounds problem
posted 10 years ago
Hi Shilpa, After completing the loop for(int j=3;j>0;j--), the value of som is 2 and again variable som is changed by the expression som=som-i which makes som 0.So far so good now with i=2 and j=2 the value of som comes to -1 which is awkward for an arrays index.So the runtime raises the exception array index out of bounds.You have to find a way so that som doesnt fall beyond 0. cheers Rajesh