1) If you want to buy books, I suggest you go to Internet. Amazon.com, bookpool.com, ....
can give you 20-40 discount.
2) You cannot rely on borrowing books from the library.
3) There are some free books on internet.
One of my friends maintains a free book list
at www.monumental.com/boat. Of course, his list is incomplete.
4) If you learn Java, you can get a lot of free learning material from sun's site.
Hope it helps