Book to learn java from?

A place to discuss the science of computers and programs, from algorithms to computability.

Formal proofs preferred.

Moderators: phlip, Larson, Moderators General, Prelates

Book to learn java from?

Postby samspotting » Sat Sep 20, 2008 6:47 pm UTC

Profile: I know how to program in C, PHP, and Perl, and Scheme. I have done OOP with PHP, but it was all very rudimentary. I have knowledge of basic algorithms and did a lot of data structures in my first year computer science courses. I need to learn Java so I actually have something useful in the real world for my next coop.

Does anyone have a good java book recommendation?

On a sidenote, I was thinking about learning C++, but from what i heard about the language I think it would be way easier to learn Java.
samspotting
 
Posts: 36
Joined: Tue Aug 05, 2008 2:26 pm UTC

Re: Book to learn java from?

Postby Qoppa » Sat Sep 20, 2008 10:07 pm UTC

samspotting wrote:On a sidenote, I was thinking about learning C++, but from what i heard about the language I think it would be way easier to learn Java.
I don't think it would be easier, but unless you plan on doing webdev and want to make Java applets, I think learning C++ would be a better choice. Actually, since you know C, it probably would be easier too.
Code: Select all
_=0,w=-1,(*t)(int,int);a()??<char*p="[gd\
~/d~/\\b\x7F\177l*~/~djal{x}h!\005h";(++w
<033)?(putchar((*t)(w??(p:>,w?_:0XD)),a()
):0;%>O(x,l)??<_='['/7;{return!(x%(_-11))
?x??'l:x^(1+ ++l);}??>main(){t=&O;w=a();}
User avatar
Qoppa
 
Posts: 694
Joined: Sat Nov 24, 2007 9:32 pm UTC
Location: Yes.

Re: Book to learn java from?

Postby tomotomo » Sun Sep 21, 2008 2:37 am UTC

http://www.amazon.com/Java-How-Program- ... 0132222205

I'm learning from the sixth edition. Since you've already done first year compsci courses, the book will probably be repetitive for you because it assumes the reader is a beginner, but you could probably skim over the repetitive parts with no problems and get to the cool parts. I wouldn't do the review, uml, or chapter exercises in the book, uml isn't used much in industry- I think, review and chapter exercises are repetitive and require an obscene amount of memorization. That's not good, not doing the exercises, but I think I compensate for the review and chapter exercises by doing self projects that implement some of the things I've learned after every few chapters, you could do that too. All in all, it's a pretty decent book.

pros
- good intro to java
- good reference
- up to date on the latest stuff in java
- lots of examples on the cd that you can compile and edit as you like and detailed explanations on the examples
- e.g. in the networking section, they teach you how to make a networked tic tac toe game

cons
- the book doesn't get into advanced oop
- boring and repetitive exercises
- assumes you're a beginner to compsci, which can get repetitive if you've already some compsci
- kind of expensive
- teaches you how to do GUI stuff from scratch, some people like to do learn that, but I simply rather use an IDE that has GUI building such as Netbeans, - a decent, free java IDE
- chapter programming exercises in the book don't have answers, programming solutions, but you don't really need them, the examples in the book compensate for that
Attachments
MyScreenHunter.jpg
6th Edition - Table of Contents
MyScreenHunter.jpg (125.33 KiB) Viewed 1078 times
tomotomo
 
Posts: 15
Joined: Thu Mar 13, 2008 2:15 am UTC

Re: Book to learn java from?

Postby headprogrammingczar » Sun Sep 21, 2008 12:14 pm UTC

How about this? It is on the Sun website, so it is as definitive as you get. it gets deep into every topic, and makes it easy to gloss over the parts you want to skip.
Don't bother with C++. The jargon file says the predominant belief about C++ is that a cleaner language based on without all the crazy crap of C++ would be almost exactly like Java.
<quintopia> You're not crazy. you're the goddamn headprogrammingspock!
<Weeks> You're the goddamn headprogrammingspock!
<Cheese> I love you
User avatar
headprogrammingczar
 
Posts: 2953
Joined: Mon Oct 22, 2007 5:28 pm UTC
Location: Beaming you up

Re: Book to learn java from?

Postby godrik » Sun Sep 21, 2008 9:31 pm UTC

I believe that "Thinking in java" is a free book designed to learn the basic of java. Since it is free, it should be easy to get a pdf version of it.
godrik
 
Posts: 23
Joined: Wed Aug 06, 2008 10:37 am UTC

Re: Book to learn java from?

Postby Elegia » Tue Sep 23, 2008 8:44 pm UTC

We learned Java at school with what I think was an early version of this book. It looks different but the title seems pretty much the same, it's by the same authors and it also covers the BlueJ environment.

If you are already well versed in OOP, I wouldn't really bother with this one, but if you aren't, I recommend it. Keep in mind though that it's a java beginners book, so the topics are not too advanced.
Elegia
 
Posts: 6
Joined: Sat May 03, 2008 9:03 pm UTC

Re: Book to learn java from?

Postby samspotting » Sun Sep 28, 2008 11:51 pm UTC

Thanks. I might just learn both. prob gona get how to program java.
samspotting
 
Posts: 36
Joined: Tue Aug 05, 2008 2:26 pm UTC

Re: Book to learn java from?

Postby Yakk » Mon Sep 29, 2008 3:02 am UTC

headprogrammingczar wrote:Don't bother with C++. The jargon file says the predominant belief about C++ is that a cleaner language based on without all the crazy crap of C++ would be almost exactly like Java.

... yet have the ability to do systems programming, have the option to not have garbage collection, keep multiple inheritance, keep operator overloading, compiling to native code, etc.

There is lots that Java did wrong for a general purpose language. As a portable compiled pseudo-scripting language (ie, VM and GC) that would rather block an entire technique than risk someone using particular constructs (operator overloading, multiple inheritance)... Java is relatively sane.
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.
User avatar
Yakk
 
Posts: 10039
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

Re: Book to learn java from?

Postby Berengal » Mon Sep 29, 2008 3:41 am UTC

Yakk wrote:
headprogrammingczar wrote:Don't bother with C++. The jargon file says the predominant belief about C++ is that a cleaner language based on without all the crazy crap of C++ would be almost exactly like Java.

... yet have the ability to do systems programming, have the option to not have garbage collection, keep multiple inheritance, keep operator overloading, compiling to native code, etc.

... you'd use D, which does have garbage collection, but doesn't prevent you from turning it off and doing it yourself. I mean, if you're really into that kind of stuff, who am I to judge?

I'm not saying you shouldn't learn C++. It's still an extremely important language in the industry. I am however saying that anything C++ can do, something else can do better, and yes, something else can do all of the things C++ does better than it, at the same time.

Wow... religious wars time much?
It is practically impossible to teach good programming to students who are motivated by money: As potential programmers they are mentally mutilated beyond hope of regeneration.
User avatar
Berengal
Superabacus Mystic of the First Rank
 
Posts: 2707
Joined: Thu May 24, 2007 5:51 am UTC
Location: Bergen, Norway

Re: Book to learn java from?

Postby Yakk » Mon Sep 29, 2008 4:23 am UTC

Yep, that is about right. :-)

I was just making sure that the OP didn't think that Java was a general purpose language. It is a good language, but it is designed for a particular set of uses.
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.
User avatar
Yakk
 
Posts: 10039
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

Re: Book to learn java from?

Postby felixalias » Tue Sep 30, 2008 3:57 am UTC

I myself enjoyed the book Head First Java ( http://www.amazon.com/Head-First-Java-K ... 960&sr=8-1 ) . The helpful diagrams make some concepts very easy to understand, and the book has formatting geared towards learning rather than a flat reference.
User avatar
felixalias
 
Posts: 159
Joined: Sun Sep 21, 2008 10:55 pm UTC

Re: Book to learn java from?

Postby intrinsic » Tue Sep 30, 2008 11:37 pm UTC

Since it isn't your first language, I'd recommend Java: The Complete Reference by Herbert Schildt.
intrinsic
 
Posts: 6
Joined: Tue Sep 30, 2008 11:11 pm UTC

Re: Book to learn java from?

Postby ptolemy » Mon Nov 03, 2008 4:16 pm UTC

I learnt java from "java for dummies". Seeing as this isn't your first language, then you might want to find a more technical book. But for those who consider themselves "dummies" in programming then i seriously recommend this book.
User avatar
ptolemy
 
Posts: 2
Joined: Mon Nov 03, 2008 4:10 pm UTC

Re: Book to learn java from?

Postby Shmurk » Mon Nov 03, 2008 5:08 pm UTC

godrik wrote:I believe that "Thinking in java" is a free book designed to learn the basic of java. Since it is free, it should be easy to get a pdf version of it.

Thinking in Java is available for free here (only in HTML for the official version). I haven't read it but, if it's as good as its C++ counterpart "Thinking in C++", it should be a very good book (and it's free!)
Shmurk
 
Posts: 2
Joined: Fri Oct 24, 2008 3:00 pm UTC


Return to Computer Science

Who is online

Users browsing this forum: Google [Bot] and 0 guests