0
for (int i=0; i<arrProduct.length; i++) {
    System.out.println("Enter product code: ");
    proCode = sc.nextLine();
    System.out.println("Enter product quantity: ");
    quantity = sc.nextInt();
}  

I inserted the product code for the first element of the array, and then for the 2nd element it wont let me insert any

output:

Enter product code: 
SAW2222
Enter product quantity:
3
Enter product code: 
Enter product quantity:
4
Federico klez Culloca
  • 26,308
  • 17
  • 56
  • 95
Rynn
  • 1
  • 2
  • Hello and welcome. For your future questions, you don't need to fill a tag quota, so please don't put extraneous tags in the question. This had nothing to do with inheritance or polymorphism (or `ArrayList`, for that matter). – Federico klez Culloca Oct 25 '22 at 07:11

0 Answers0