r/java • u/benevanstech • Aug 06 '24
Free Book - Java in a Nutshell
Hey folks - I'm super-pleased to announce that my book "Java in a Nutshell" (8th Edition) is being made available for free download for another 6 months, courtesy of Red Hat - https://red.ht/java-nutshell-free
Hope you like it and find it useful!
2
Aug 06 '24
Is that a good book?
2
2
u/neutronbob Aug 12 '24
It's a good reference book, when you need to look something up and get a quick, definitive answer without having to read through a tutorial.
14
u/kwikasfuki72 Aug 06 '24
This was the first reference book I purchased way back in the late 90s (97 I think it was).
The API reference and this book was all I needed to launch my Java career.
Brilliant book.
13
11
7
u/Borbarad13 Aug 06 '24
Does the download work without account? Otherwise it's not free as the payment would be data.
1
u/RapunzelLooksNice Aug 07 '24
My question exactly.
1
u/csgutierm Aug 07 '24
You need to create/use an account to get the "dynamic" download link
Download links are dynamic and available for 240 minutes before they expire.
1
2
2
2
u/moosechowder Aug 06 '24
Thank you for sharing the book. I also found other useful books on the Redhat Site
1
1
u/phlummox Aug 06 '24
Ah, neat! I found the original Nutshell was very handy for getting people up to speed with Java if they were already familiar with other languages. I didn't realize it was being updated again - glad to hear it, and I'll recommend it! :)
1
1
u/astaluvesta Aug 06 '24
The fact that Java is pass by value can be demonstrated very simply, e.g., by running the following code:
public void manipulate(Circle circle) {
circle = new Circle(3);
}
Circle c = new Circle(2);
System.out.println("Radius: "+ c.getRadius());
manipulate(c);
System.out.println("Radius: "+ c.getRadius());Is the answer for the question in the book right?
2
2
u/laplongejr Aug 07 '24
"The fact that Java is pass by value"
I'm kinda surprised, because I was taught that "by value" and "by reference" are both wrong or at least too ambiguous to explain to somebody trained in a language allowing those things (aka C++), did the common idiom change over the last 15 years or was my teacher stupid?Java passes a reference, but that reference is passed by value.
Your example proves it's not by reference, while this one would prove it's not by value to a newcomer.public void manipulate(Circle circle) { circle.setRadius(3); } Circle c = new Circle(2); System.out.println("Radius: "+ c.getRadius()); manipulate(c); System.out.println("Radius: "+ c.getRadius());If the contents of circle were passed "by value" (instead of the reference), then the second getRadius call wouldn't be expected to return a different value. But saying "by value" would imply no reference is passed...
1
3
u/Turbulent_Rip_7350 Aug 06 '24
Awesome π, how long did it take to write the book? .