TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask YC: Best book for Java

9 pointsby kashifalmost 17 years ago
I am working on a project that the client wants in Java, specifically using Struts. Any recommendations on a good book for learning Java for an existing programmer? time as always is a scarce quantity.<p>EDIT: Web Programming in Java

13 comments

rcoderalmost 17 years ago
If you haven't done web development with Java/Struts before, you actually may want to reconsider whether taking this project on with a tight deadline is in your best interest. The tool ecosystem is very different for the Java web developer, and I'm afraid you may find yourself spending more time reading API docs and puzzling through XML configuration files than actually writing code.<p>If the client wants Java/Struts code for a <i>good</i> reason (like they have in-house programmers who can maintain Java webapps) your first Java project may not be up to the standards they expect. If they want it for a <i>bad</i> reason (say, because the CIO read about it in an in-flight magazine) then you should be able to push back on the decision and choose a framework with which you're more comfortable.
评论 #221301 未加载
richeshalmost 17 years ago
I'm assuming you are looking for Struts 2, if this is the case there are only few good books out there. I own all these books below and they are useful, but they are not as updated as the latest release. My suggestion to you is to keep an eye on the struts 2 wiki and join the mailing list to get the latest information.<p>1. Practical Apache Struts 2 Web 2.0 Projects (Practical Projects) by Ian Roughley - <a href="http://www.amazon.com/Practical-Apache-Struts-Web-Projects/dp/1590599039/" rel="nofollow">http://www.amazon.com/Practical-Apache-Struts-Web-Projects/d...</a><p>2. Starting Struts 2 by Ian Roughley - <a href="http://www.amazon.com/Starting-Struts-2-Ian-Roughley/dp/1430320338/" rel="nofollow">http://www.amazon.com/Starting-Struts-2-Ian-Roughley/dp/1430...</a><p>3. Struts 2 in Action (In Action) by Don Brown, Chad Davis, and Scott Stanlick - <a href="http://www.amazon.com/Struts-2-Action-Don-Brown/dp/193398807X" rel="nofollow">http://www.amazon.com/Struts-2-Action-Don-Brown/dp/193398807...</a>
j2d2almost 17 years ago
A few things to remember when programming java:<p>1) It's <i>not</i> pass-by-reference. Java is pass-by-value, but it is passing pointer values, not variable values. This sometimes behaves like pass-by-reference but if pass a from foo() to bar() and call new on a inside bar, a will get it's old value once bar() returns to foo().<p>2) Eclipse has a tremendously useful debugger and, as an emacs guy, I can vouch for Eclipse being well worth learning. You can change code in running programs, but beware it reruns whatever method you're in. Sometimes (possibly all times) without resetting values changed in that method.<p>3) Use interfaces when you can. Map instead of HashMap, etc.<p>4) Leverage the classpath for testing bugfixes easily. Create a jar with your <i>fixed</i> class, put it in front in the classpath. Keeps things simple and let's you build upon anything you shipped to a client.<p>5) If you have to use RMI, understand why readExternal() must reflect the order of things from writeExternal() and how this can break easily. This specific case may not be useful to you right now, but it will help you understand what RMI, and serialization in general, is actually doing.<p>I'm sure there are other good lessons but it's been a while since I worked with someone new to java.
strlenalmost 17 years ago
Bruce Eckel's _Thinking in Java_ (available free online, just as are his C++, Design Patterns and .NET books) is excellent, combined with just API references.
coglethorpealmost 17 years ago
I'm developing a webapp in Java/Struts for a client now and have found the internet (a variety of sites, via search engines) to be my best resource. I don't think I've used a book in years now.<p>Here's a few I've run across:<p><a href="http://www.theserverside.com/" rel="nofollow">http://www.theserverside.com/</a><p><a href="http://www.developer.com/" rel="nofollow">http://www.developer.com/</a><p><a href="http://www.javaworld.com/" rel="nofollow">http://www.javaworld.com/</a><p>There's a ton more.<p>And the sources, of course:<p><a href="http://struts.apache.org/" rel="nofollow">http://struts.apache.org/</a><p><a href="http://java.sun.com/" rel="nofollow">http://java.sun.com/</a><p>I use MyEclipse to develop and it's pretty helpful and has Struts support:<p><a href="http://www.myeclipseide.com/" rel="nofollow">http://www.myeclipseide.com/</a>
评论 #221279 未加载
pbnaidualmost 17 years ago
I would also read Effective Java along with Struts related text book. Here's the link to the book <a href="http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683/ref=pd_bbs_sr_1?ie=UTF8&#38;s=books&#38;qid=1213823747&#38;sr=8-1" rel="nofollow">http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/032...</a>
hello_motoalmost 17 years ago
Kashif:<p>1) Head First Java 5 1) Effective Java<p>The strategy here is to study both interchange; once you learned a topic from HF Java 5, check the best practice in Effective Java.<p>2) Head First JSP/Servlet 2) Any Struts 2 book<p>You can start with the basic few chapters from HF JSP/Servlet and move on to Struts 2. If you found alien concepts in Struts 2, check back HF JSP/Servlet.
dedalusalmost 17 years ago
Just Java by Peter Van der Linden is an exceptional introduction thats comprehensive and well thought out (may be not just for complete newbiee)<p><a href="http://www.amazon.com/exec/obidos/ASIN/0131482114" rel="nofollow">http://www.amazon.com/exec/obidos/ASIN/0131482114</a>
huhtenbergalmost 17 years ago
Go over "How to Win Friends and <i>Influence People</i>" by Dale Carnegie and then convince them to stay away from Java.<p>You will benefit not only yourself, but the humanity as whole :)
评论 #221162 未加载
评论 #221256 未加载
jsmcgdalmost 17 years ago
If you read this book you will <i>know</i> Java.<p><a href="http://www.deitel.com/Default.aspx?tabid=1191" rel="nofollow">http://www.deitel.com/Default.aspx?tabid=1191</a><p>Highly recommend.
评论 #221534 未加载
评论 #221338 未加载
评论 #221311 未加载
Tichyalmost 17 years ago
I started with the Java tutorial. Back then I really liked it. Not sure if it is still as good (feature creep), but might be worth a look.
xlntalmost 17 years ago
SICP
评论 #221420 未加载
albertcardonaalmost 17 years ago
Please save yourself from the limitations in java syntax and use clojure/jython/scala. Clojure is my favorite -native java speed but lisp syntax, and awesome lock-free multithreading.<p>What your client really wants is the JVM and its libraries, not java the language.
评论 #221375 未加载
评论 #221433 未加载