Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm am looking for online tutorials/books, which assume a solid knowledge of OOP/Design patterns concepts and stress on differences (both conceptional and syntactical) between C++ and Java thus allowing for a rapid development in the latter.
Thank you very much in advance, appreciate your time.
I moved from C++ to Java 6 years ago an used "Effective Java" by Bloch, this is a style book which explains in 50 short articles how best to use various java classes and techniques. This is very similar to "Effective C++" by Meyers and "Exceptional C++" by Sutter.
If you already know C++ and object oriented programming and can read Java this is the fastest way to write good quality java code.
There is a new edition out now with generics etc. In my mind this book is essential for all Java programmers as well as those wanting to learn Java.
The Java Tutorial.
It is kept up to date and well written. Also available in hard-copy.
I'm always skeptical about "change from X to Y" guides. Though they may help as reference points afterwards, learning a new language by coming from another one may be tricker than you think.
I think it is important to learn the new language "as designed" and to get the feel for the way to things "right" in this language and also learning its code idioms.
As a good book for experienced programmers who also want to learn about potential pitfalls of Java, I recommend Effective Java.
O'Reilly's 'Head First' books are very well written. Take a look at Head First Java and Head First Design Patterns.
I made this transition in 1996 or so when Java was newish. A book will definitely help. I used Laura Lemay's 21 day book, which is now up to rev 6. It took me 3 days to get through the original book and another week before I felt I was fully conversant.
Things to get used to:
The language is not huge, but the support libraries are. There probably is already something that does what you want
Garbage collection and sane memory management is awesome. My bug count plummeted in working with Java compared with C++
Garbage collection and sane memory management sucks. I was writing performance critical applications and (at the time), I would've killed someone to get something similar to placement new or operator new overload.
Garbage collection is not general resource collection (ie, open files etc). You still need to worry about that.
I really missed having an integrated macro preprocessor. You can still use one, of course, but then your build has just gotten more complicated.
Avoid head first Java. It is low signal to noise. Nutshell is good but has become huge, like the language.
If you are an experienced C++ developer, I would recommend skimming through the Java Tutorial (as mentioned by Gerd Klima). Then, just open up the Java API documentation and jump right in, feet first.
When I did (sort of) this, I used O'Reilly's Java in a Nutshell. It now seems to be more like "Java in an intermodal shipping container" though, so perhaps it's not as quick anymore. I would still expect it to be decent, I think it's more reference material nowadays.
There are several books covering "Java for C++ Programmers" on Amazon.
You definitely need a book, and there are many out there.
Beyond that, one thing that helps, IMHO, is a cheatsheet, that you can print and put up next to your monitor. As you learn stuff you can add them to the sheet.
Here are a couple, specifically for C++ programmers:
http://www4.ncsu.edu/~kaltofen/courses/Languages/JavaExamples/cpp_vs_java/
http://www.cprogramming.com/tutorial/java/syntax-differences-java-c++.html
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Knowing how Java works in initializing objects and how it bind methods and fields to an object , abstract , final methods to an object and some other issues take a lot of time to guess myself , and i needed to ensure that every guess i made was correct by asking here and there .
I need some recommendations to read or watch (books-tutorials-articles-videos) , thanks in advance
What better source than Sun's Java Language Specification?
You can read any java book out there, there is a ton. But you won't know how java works until you actually start programming. Find a project and start coding!
I do like the Head First series for beginners. There is a Java book they publish. http://headfirstlabs.com/
Go through the article in http://www.javaworld.com/ and such sites.
if you want to understand how java works i would recommend Inside Java Virtual Machine by Bill Veeners
If you want low-level knowledge, perhaps studying the JVM itself would be appropriate.
Effective Java by Joshua Block http://astore.amazon.com/techncafe-20/detail/0321356683
Java Concurrency in Practice by Brian Goetz http://astore.amazon.com/techncafe-20/detail/0321349601
I'm currently waiting for Beginning Java Objects: From Concepts to Code to arrive on my doorstep. I hope it will be what you are looking for. I am purchasing this book because I too need help understanding objects in the Java language. I think it would be best to understand how objects are used in the language, then continue studying the language itself.
After that book, I'll go onto (or read at the same time) Beginning Java 2 by Ivor Horton. Both books received really good reviews on Amazon, so hopefully they are good for both you and I.
What I think you are getting at is how java really works under the hood. To that end, I think you would do well to understand byte-code, what java is interpreted to, and what the byte-code instructions mean to the jvm. By understanding what all of the Java language features convert to on a more raw level, you'll walk away with a much deeper understanding that, honestly, few people I've met have on the subject.
To this end, I'm going to suggest something that is a bit of a deviation from the norm and tell you to look at this book, Expert .NET 2.0 IL Assembler . That book is on the .NET intermediate language, the analogue to java's byte-code. I'm suggesting that simply because no good book exists on this for Java byte-code, and this is book gave me the understanding to easily tackle Java.
I would recommend SCJP preparation book:
''SCJP Sun Certified Programmer for Java 6 Study Guide''.
It has good overview over all java components. It speaks about neat areas, that you might get surprised with.
You need to go back to basics and read a good Java introduction (just skip the parts you know), as these are realy basic Java questions you have. Most popular text is:
Head First Java (2nd edition)
Or for a more down to earth advanced text:
Core Java, Volume I - Fundementals (8th edition)
I am going to begin my Computer Science & Information Systems degree in April. My first class is an introduction to Java programming.
Lately I have had an interest in Objective-C, but slowly declined due to lack of persistence and comprehension difficulties, (mostly some OOP). Obviously I would like to do well in my classes, so I am asking what is the best way for me to prepare?
Should I complete the Alice training and then start learning some Java on my own? Continue to work through Objective-C religiously until I see results? What do you think a newby should do?
edit: I have been reading reviews for a lot of Java books, just curious, are there any other well written beginner books? Thanks!
Objective-C probably has some barriers that will be problematic if you're learning.
I would suggest picking up a copy of either Thinking in Java or Head First Java and reading through that to get started.
When you're learning it can be useful to not be distracted by too many details. Master the basics. Learn about basic OO design. Frustration is the biggest enemy. If what you're doing seems daunting, the greater the chance you'll just give up. So keep it simple so each time you do something it feels like you're making progress.
Firstly pick one of the two languages, either Objective-C or Java, as learning both at once might not give you encouraging results and you're gonna have a lot on your hands than you can handle at one time. So, I'd suggest you go ahead with Java as Java is also going to be your first class. Java is huge, so keep it simple in the beginning and concentrate more on the fundamentals and you can build on top of that as you progress. And you can always ask questions here on SO. Also you probably might find the java classes easy as you've already been doing your homework.
In addition to the java books already mentioned, I'd suggest you go ahead with the Sun's java tutorials.
As a java beginner, you might also find this free book helpful:
http://www.greenteapress.com/thinkapjava/
I think one of the best ways of learning the basics of programming these days is by playing with Ruby. You will have to spend something close to 0% of your time worrying about infrastructure issues (compilers, header search paths, etc), and you can experiment with the interactive mode (irb) to rapidly learn how to use various features.
You can start out with Ruby without having any concept of what objects or functions are, yet you will gradually learn about quite advanced object oriented topics, and even functional programming-style patterns.
Chris Pine's "Learn to Program" teaches the basics of programming using Ruby. I haven't read it, but had a look and it made a good impression.
(There are also many other books teaching Ruby.)
There is nothing inherently bad about learning programming through Java, and it gives you a general understanding of OO design, but it is a pretty limited language. Ruby is just much more fun and you get to learn a lot of advanced techniques that aren't even possible to use in Java by just experimenting with it––many of which will be useful when you're learning Objective-C later.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm going to create a project in some month in a course I'm having and for that purpose I would like to read and try making some small test programs regarding the network / socket programming in Java.
Ideally, what I'm looking for is a tutorial with description and a end program to create where I can between two computers send and resive small and simple text messages. Don't have to be any GUI or something like that just the simple version.
I've read some articles from Sun's own homepage and in one of my Java Book but I seem to be missing the last piece of the puzzle to really understand that "network programming".
In addition, I don't know if I'm mixing things now but to my understanding can the multithreading paradigm also be applied to the network / socket programming.
Therefore, my question is, if anyone knows about a good tutorial or educational link for me to get an overview of this topic. I’m not totally new to Java but haven’t got any experience in this type of programming.
Thanks
- Emil
Here is a nice sample chapter from Java Network Programing. There's also some other parts available here, and also sample sources are available.
If you'd decide to buy this book, I'd say these chapters are enough for now:
Chapter 2. Basic Network Concepts
Chapter 3. Basic Web Concepts
Chapter 4. Java I/O
Chapter 5. Threads
Chapter 6. Looking Up Internet Addresses
Chapter 7. URIs and URLs
Chapter 9. Sockets for Clients
Chapter 10. Sockets for Servers
Don't bother about NIO yet; it's quite advanced.
In addition, I don't know if I'm
mixing things now but to my
understanding can the multithreading
paradigm also be applied to the
network / socket programming.
Yes, indeed it's a very important aspect. You'll find out why once you've read the sample chapter.
Have fun!
I've only read the C version of this book, but likely Java version is going to be equally short and good: Calvert and Donahoo's TCP/IP Sockets in Java: Practical Guide for Programmers. Even if you learned socket programming in C, you could probably adapt to Java's implementation fairly quickly.
For basic steps you might wan't to read this tutorial Sockets programming in Java. In this model the most people used one thread to handle one network connection.
In java 1.4 NIO was introduced, this makes intros a bit more complex: Java NIO Tutorial.
NIO allows to use a Selector which allows you to handle many connections in one thread, which leads to higher performance.
There is no universal book for this kind of learning. The best bet is to start with java's own tutorial on sockets/threads etc here.
By encountering problems once you start the implementation it is then you will start learning, preferably by visiting SO again and asking a bunch of specific code questions.
from my experience and in my opinion, when you want to learn socket programming at the level of abstraction provided by the Java Network API and for any language for that matter, you also have to be familiar with i/o and threads. there are a lot of tutorials out there, i suggest you grab a book. just a thought!
If you want a simple, uncomplicated and easy-to-understand introduction to networking, I will strongly recommend that you read: Introduction to java programming 9th edtion by Liang Y. Daniel. Chapter 33 is networking, and chapter 32 is multithreading.
This book is very good. almost all i know in java, I got from that book. In that book, complex ideas are made very easy to understand. sorry i could not get the link for you. You can google it.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I have absolutely no programming experience but need to learn Java - enough to take a J2ME fasttrack course. I only have 10 weeks. Can I do this? What's your advice about the best resources I can use ?(currently using Sun's Java Tutorials).
10 weeks? Apparently you can do it in 24 hours!
http://www.amazon.com/Sams-Teach-Yourself-Programming-Hours/dp/0672328445
EDIT:
Okay, so only 1 person found my answer amusing, but not amusing enough to upvote. The real question is how good do you need to be in 10 weeks?
If you get yourself a good book (the one linked above has some good reviews on Amazon), then in 10 weeks you might be proficient enough to do something useful in Java, but it takes years to become expert. Any time spent between 10 weeks and several years will move you from beginner towards expert.
Oh and read Teach Yourself Programming in Ten Years.
OK, based on some of the previous answers, I am expecting to get downvoted for this, but, I think you are delusional to think you can learn, on your own, how to program in Java in 10 weeks with no programming background. No person, with NO programming experience, other than some sort of prodigy, is going to learn to program in Java or almost any language in 10 weeks.
For clarity, copying and running hello world from a book does not make you a programmer. Hell, it will most likely take days just to get that working in some IDE.
Now, can you study and potentially pass some test? Maybe, but that depends on the depth and format of the test.
If I asked if I could become a doctor in 10 weeks, I would get laughed at for asking, so I am somewhat surprised at the answers that indicate that it is somewhat possible. I can stick a bandaid on my daughter now, but it hardly makes me a medical professional, it just means I managed their version of hello world.
The main question is whether you've done any programming in the past since that may be the main effort. I would suspect that if you had not, you could get by but not necessarily do well. You indicate that you didn't have any programming experience, so this is where you are going to have most problems and spend most of your time. Java would not necessarily be faster or slower to learn than other similar languages.
Sun's Java tutorials are great, but unfortunately programming is one of the things where practice is necessary, and that depends on your free time. It's also necessary to stop and practice frequently rather than after reading half a book. If you devoted 10 weeks full time to it - yes, it's quite doable for some people. After all, college students become passable developers in one academic year where they take other unrelated courses.
I would focus on figuring out Java fully first without trying for J2ME. Then you can make the switch.
In addition, realize that there's a big difference between the language and the standard library. The important thing is to learn the language. There are certain standard library calls that everyone uses and are critical to learn, but they're not part of the language. However, you'll never really know the entire library (Though you'll learn from exprience). It's more important to learn how to find the functionality that you're looking for then to know exactly what it is or where to find it. The important thing is to avoid reinventing the wheel.
Also, realize that you may only be a passable developer at the end. Experience takes time and often can't be hastened.
In addition, even if you learn to program you will miss some of the critical general CS knowledge like data structures and algorithms. Programming books rarely teach that, you will have to learn that yourself (see, for example, the TopCoder tutorials).
Okay, there are a lot of people here saying, "yes" and "yes, but it will be hard" so I'll differ.
No.
The problem isn't "learning Java" in 10 weeks, because I think that by the time 10 weeks is up, you'll be able to program some things and have an idea of what to do to solve some simple things.
But that won't make you ready for a J2ME fast track course. Fast track courses tend to be for people that have a strong background in the prerequisites. You might be able to do many of the things as you are going along, but without the background to understand the why of what you're doing, it will seem like a lot of semi-random things to memorize by rote, and will likely quickly vanish.
Basically, I think it just takes time: time to let lessons sink in, time to experiment and fail a few times so that the why suddenly jumps out at you...
Ultimately, I suspect that you could get through it, but that you would not end up being very proficent at all. (the final two paragraphs of Uri's post say it all.)
I don't want to be a complete downer, and I definitely hope you do well and succeed...but I would hate to bet money on it.
(Understand, I don't know you from Adam...so I'm making statements based on my experience with how it was for me, and people I've worked with...so this isn't a slight against you...just an observation that this is a very big meal you're setting down to eat.)
Learning to program for the first time is kind of like learning a foreign language. You will easily be able to recreate the phrases you are taught, but you will lack the understanding of the context for why it is done that way, and will thus be unable to solve new problems effectively. It simply takes time.
If you're a first-time programmer, I really can't recommend Java. Python would be much better (disclaimer: Python fan-boy, but for good reasons).
However, I don't think a beginner could do much better than Head First Java
The main problem you're having is that you're learning programming for the first time with Java and I think Java isn't the best language to start.
I suppose that you're addressing a work project, Is this the case? That pressure might make things worse. Depending on how complex the project is you might success but learning Java in 10 weeks without background knowledge is another issue.
I teach Java Programming at a high school, and our course runs 14 weeks. This is enough time to give students a solid foundation in object oriented programming, but students are not experienced enough to develop and large projects or anything too complicated.
Many schools use the textbook by Lambert & Osbborne:
Lambert, K. & Osborne, M. Fundamentals of Java: AP Computer Science Essentials for the AP Exam. 3rd ed. 2006. Thomson Course Technology.
I'm computer science student who just finished my first Java course.. I'd say it's possible to learn Java on 10 weeks if you hard work on it. But you'll only get an intro! Programming is much more than just knowing the language (API, syntax etc)..
Best Java book ever: http://www.amazon.com/Introduction-Java-Programming-Comprehensive-Version/dp/0136012671/ref=sr_1_1?ie=UTF8&s=books&qid=1242328533&sr=8-1
It depends on how hard you want to work, but yes it's possible. The problem you are going to have is that you have to learn to program along with learning java. These are two very different things. Programming is knowing how to read and write logic and Java is a language you write it in. If you have a math or physics background, this is going to be a lot easier, as you are already exposed to thinking in such a manner.
If you don't have books on beginning Java I would go buy one of those.
I would also pick up the book Code (I would try and get through this in a few days, if not over the weekend if possible). Actually with 10 weeks I would do this first as it will be a foundation for what you'll need to know to program Java.
With 10 weeks, you are going to have to pretty much study every night to get the hang of it by the time you go to class. My best advice is that when you take the class, take lots of notes, and don't expect to understand everything. Most of what gets thrown at you there will probably go over your head at first and you'll forget. That's ok. After the class if over, go back and review the notes etc until it starts to make sense.
My experience in Java programming for beginner is not difficult to learn; however it is really depended on how your object-oriented programming skills are. As you posed that you had no programming experience , I guess that I recommend a web site, http://www.exampledepot.com/ , and type any java keyword such as Swing, FileInputStream, it provides a lot of practical examples that you can apply into a project.
Please, buy a java book (Sams'java 6 in 24 hours) as reference. It will give you really basic skills for java within a short time. and I sure you will have enough time to learn about the java and J2ME within 10 weeks. Good Luck.
Tiger
I have to say that you are taking on a lot in just 10 weeks, I just finished a semester of Java programming at Indiana University Southeast, and I don't think I have begun to scratch the surface yet. Java is a very strict language in that its syntax is very tough to get a handle on if you have no programming experience at all. I will offer these pieces of advice go to www.bluej.org and down load there, Java compiler it is said to be the easiest to work with and that most college's use this. It is also, what we learned on and from what I know now I can say, they are right. Java is an object oriented language, and Bluej gives you a great understanding of objects. They also show you how to design, classes, methods, array, array list, hash maps, all of that is on this site and it is free. I hope this helps and good luck with your challange.
There are different schools of thought regarding how much time you need to become expert in programming. I'm not going to add to it.
I suggest if you have absolutely no programming experience, learn C first. Then move to Java.
The following site is very good for learning java.
http://www.javapassion.com
Doable, yes. But you'd missing out on a lot of theory behind programming so even though you may know the language well enough to code in it, you won't know how to program well. I'd suggest picking up a few beginner's books on object oriented design while you're at it. The best (for me at least) teaching and helping tools for a new language are tutorials and forums like this (don't forget to google first though, there are a lot of beginner questions answered with a simple search).
Good luck!
You can definitely get a good understanding of Java in 10 weeks, but as mentioned before, practice makes perfect (or at least better...). A couple of starting places:
The Java API will be your friend:
http://java.sun.com/j2se/1.5.0/docs/api/
Java has a lot of built-in functionality so try not to duplicate it (String functions and whatnot).
Also, an IDE might make some things a little more complicated, but it'll also help you find your way around the API. Eclipse is a good place to start (and it's free)
http://www.eclipse.org/
Hope that helps a little..
Can you learn to draw, sculpt, or paint in ten weeks? Anyone can learn to punch the keys to program, just as anyone can pick up a brush, but it takes time and talent to cultivate the artistry to develop. Do yourself a favor and put the time and effort in to learning, not cramming. The lessons you learn by a concerted effort to know how to develop will serve you much better than binging on it to meet some arbitrary date.
I can sympathise... having once been in a similar predicament, though I did at least have some background. I concur with #ShawnMilo regarding Head Fist Java. Also recommend Sams Teach Yourself Java in 21 Days and, given that you say you have no programming background, I strongly urge you to look at The Oject Oriented Thought Process by Matt Weisfeld. I also concur with all the people on this thread who say that there's WAY more to programming than 'simply' learning one language (especially if it's Java). Having said that, good luck and god speed.
PS I'd +1 #Patrick McDonald for sense of humour, but I don't have enough rep!
PPS And another virtual +1 for #Robin. I was wondering when the Four Yorkshiremen would get in on this thread...
For java, you also need to learn how to use an IDE and setup your environment and this kind of this to make java works...
Then for J2ME, you'll need to know things about embedded/mobile systems....
10 weeks with the tutorials would be ok but it also depends on what you're going to do in your j2me course...
I would go head first in a j2me tutorial (assuming you know a minimum concerning variables functions and OO)...
good luck...
The best advice for learning to program is basically: write a lot of programs.
Project Euler contains lots of problems well suited for this purpose, as the resulting programs are manageable in size while actually allowing you to solve an explicit problem.
http://projecteuler.net/index.php
I worked with some self-taught programmers who read stuff like "learn javascript in 0.01 days". Everyday was worth it's share of thedailywtf.com.
Besides, at a job inteview you get asked "how much javascript experience do you have?", your answer "0.01 days".
so good luck but I hope our path won't cross before a few more years
I wouldn't say I had "no programming experience" but prior to learning J2ME, most of what I'd done was in assembler more than 10 years prior.
I skipped learning "JAVA" and learned J2ME, which appears to be a small subset of java. It's small enough (if you ignore the extensions) that it's very digestable and easily explained in a moderately sized book. From that standpoint, it was a little bit like assembler (somewhat limited amount of stuff to know) although I did need to learn about OOP.
I bought a few J2ME books, but the one I found most helpful was: "Programming Wireless Devices with the Java 2 Platform" by Riggs, et al.
I don't recall exactly how long it took me, but I'm pretty sure I was writting deployable code (it was a mobile time sheet application) in 12 weeks or so.
I had no programming background and wanted to learn PHP. It took me about 6 months practicing beside my normal job to develop my skills enough to write some simple applications for a website. Java is a bit more complex...
10 weeks? Are you crazy? the Java API is massive not to mention Java EE how could possibly get through that in 10 weeks? you could maybe get through 5% of that in a couple of months. I'd say it would take at least a year to lean Java fundamentals for a newbie. I mean you can't just read a chapter on a subject and then think you understand it. You have to spend a good deal of time using that concept or part the API to at least commit it to memory never mind actually have a good grasp of it.
Realistically I'd say at least 2 maybe three years of programming to reach industry entry level standard. And that's if you really apply yourself.
I don't see why you couldn't do it. I am a book person, so pick a book and run through it. Set up some small projects and finish them. 10 weeks is longer then I usually get to learn a new language.
Have fun and hope you learn a lot.
I would post the books I learned java with but they are at home and I ain't.
As others have mentioned, 10 weeks ought to be enough if you have a computer programming background.
Closer to 6-8 weeks, if you're Jeff Atwood.
I've been using C++ for about 6 or 7 years now, and I consider myself fluent in it. I've never bothered with Java until now, but I find myself out of the job (company went under) and I need to expand my skill set. Someone recommended Java, so I am wondering if there is any advice for where somebody like me might start. I am also interested to know what the key aspects of Java are that are most likely to come up in an interview.
There are some popular areas that I think of when we talk about Java
Concepts of OOP: I'm sure this will not be much different from C++:
Class, Abstract Class, Interface,
Polymorphism, Overriding,
Overloading, Inheritance, Static
member, ... Interface will likely be
area that you might want to focus.
Since this is not directly available
in C++, I don't know.
Core Java: Such as the basic syntax and the common classes such
as Math, String, System.out,
Scanner, Basic file I/O, Stream.
Know the concept of Garbage
Collection, Reference Type (since
pointers are not available here.)
Know the Java platform/technologies,
J2SE, J2EE. Basic GUI with Swing and
its layout managers. Web
Applications with Servlet/JSP.
Popular tools, frameworks, and libraries: This may not as
important as above bullets. But
maybe you should know what Eclipse,
Netbeans, Spring, Struts, Hibernate,
EJB, Ant, JUnit, JavaDoc, are for.
You can always search for "C++ to Java" in Google. I'm sure there will plenty of good start points. Don't forget not to put * in front of var name next time you code Java :)
I recommend you read the book Effective Java cover to cover. Not only will you learn lots of good programming practices, but you will also learn more about Java than you otherwise would. Highly recommended. :-)
As a simple example, in Java, rather than rolling bitfields by hand (which is rather painful to do in Java, and for good reason), you use an EnumSet instead. This is documented in Item 32.
BTW, if you don't mind reading a PDF (no DRM) version, it's cheaper than hardcopy too: http://www.informit.com/title/0132345285
There are a number of great "in depth" Java books that will teach you not only Java, but also best programming practices.
If you're just interested in syntax and an introduction to the Class Hierarchy, Java in 24 hours is pretty good. From there, you will know enough to go and explore more on your own.
I highly recommend thinking of a small project to help you learn. In fact, think of a teeny tiny project -- it will turn out much bigger than you think! ;) Maybe a simple shoot-em-up or a Daleks- or Asteroids-alike, or some such.
The main thing being: for an expert-level programmer, don't try to learn Java from a book. You can get introduced to Java via a book, but then you have to go learn on your own (or from another.) It's like learning to drive a car -- you can get the basics from a book, but you need to explore & try stuff, and someone who knows how can be very helpful.
Some things that will help:
Download and bookmark the HTML Java docs. You will reference them often.
Have a small project, a simple game or utility app that you estimate will take a couple of days to write. Spend a couple of weeks writing it ;)
Note that "Java" is 3 things:
Java the programming language. Like C++ or Lisp or Perl.
Java the Class Hierarchy. Like STL or Cocoa.
Java the run-time virtual machine, the JVM.
People use the word "Java" to mean all 3 things, and slip between them without much notice, so pay attention to that, when you start talking Java to people.
Good luck!
(And let us know when your game is available :)
The biggest issue with the C++ to Java conversion is that they're so similar -- you'll find yourself doing C++-isms for a while. But it's no big deal: as suggested, read Josh Bloch's book, and run through the tutorials on java.sun.com and you'll do fine.
In my opinion, Java sets itself apart from C++ in three ways:
Automated memory management
Simplified syntax (and no preprocessor)
The Java standard libraries
As a former C++ guy, the first two shouldn't be a problem. (In fact, I would wager they will strike you as rather refreshing.) To get used to the libraries, I recommend Bruce Eckel's Thinking in Java - the 3rd edition is free to download. Though the beginning chapters will probably be a little too basic, the sections about GUI programming, concurrency, and the various container classes will be very helpful.
Beyond that, the best way to learn any language is to read good code.
I started by reading the Java Language Specification, version 2 at the time (2001).
In my view it is quite readable as specifications go.
Effective Java is good advice.
Java Puzzlers is good to learn corner cases and possible pitfalls.
The Peter Norton's Guide to Java Programming, "Making the Transition from C/C++ to Java".