First of all, I strongly&&friendly recommend formatting your code using a beautifier, like Jacobe:
http://www.tiobe.com/jacobe.htm (it's free for Windows and Linux).
It will make the program's flow much more obvious.
I found and fixed several issues (first 3 are listed below):
1) for (int count2 =0; count < 4; count++) {
if (BorrowersList[count2].bookid1.equals("num2"))
It should be "count2 < 4; count2 ++)
2) num = BorrowersList[count2].bookid1;
It should be:
BorrowersList[count2].bookid1 = num2;
because you update the list, not the num2's value.
3) if (BorrowersList[count2].bookid1.equals("num2"))
It should be
if (BorrowersList[count2].bookid1.equals(num2))
because you compare with num2's value, not with the string "num2".
For instance, if num2 = "Book2", then "num2" is still "num2", not "Book2".
By the way, I believe it's easier to put Book1 / Student 1 instead of B1 / adam.
At least for me, it makes the code easier to read.
I tested the program in two cases:
Case 1:
Input:
S1
Book5
Output:
Sorry, the book is not available...
Student1 has no books.
Case 2:
Input:
S1
Book2
Output:
Student1 has Book2
Although the program works, it does not verify if a student has already one book, so, if Student2 borrows Book2, Book2 will replace Book1, instead of adding it as the second book. Of course, this could be fixed, if you want that. For now, I just want to make sure the program works.
Should you need more details, I'll be glad to provide them.
I attached the code in LibraryMain.java