Hello I am trying to devise some code to store the index values of where I have found a book title and key code (which will be ISBN) in an array, I am stuck at here
for (int k = 0; k < bkArr2.length; k++) { if (bkArr2[k].getTitle().equals(titl) && bkArr2[k].getISBN() == ISB) { System.out.println("Index Information At Index Arr[" + k + "]: " + bkArr2[k].toString()); //bkArr2[k].getPrice(); } }
if there equal I print a line saying I found it but also want to store all the values found, there could be more then 1. Should I make a second array and store the values there?