I know a little Java. I've written HelloWorld.java more times than I care to admit. I've written small multiclass apps that use Java's Math.random(?-- I think this is right, it's been a while) to simulate rolls of multiple dice with variable numbers of sides. So I know a little.
I can tell you immediately what hurdles I have trouble with. The first is arrays. Sometimes I just have issues with the things. Second, is the API. The thing is freakin' huge, and I don't know what it contains, so I don't often know if I'm reinventing the wheel or not.
(I haven't even moved on to more complex issues like threading, yet.)
What resources (book, websites, etc.) would you recommend? And if you recommend the API docs at Sun to me, where would be the best place to start?
(And if I sound like a total newbie to you, you ain't far from the truth.)
I agree that a book like Just Java is worth the investment. I've also heard that Head First Java by Kathy Sierra and Bert Bates is good, but I haven't looked at it myself.
Also, don't worry about reinventing the wheel. It is often a good learning exercise to do so. However, once you learn about a specific tool that is available in the API, then USE IT. There are many reasons to do so. One is that the API was written and tested by experts. There are very few bugs in the API, so it will work as expected. Can you say the same about code you write yourself? If you spend enough time testing it you should be able to, but that means more time spent on testing utilities rather than working on the main portion of the program you want to write.
So what I'm trying to say is that you shouldn't be daunted by the size of the API. I doubt anyone knows everything that is available. Just learn pieces of it as you go and use what you have learned. Occassionally browse through the API docs so you can get a feel for what is available.
I would definitely recommend _Headfirst Java_, even if you have some experience, you can get a lot out of it and be entertained at the same time.
As far as the API, one of the best things to do is browse the forums right here and click on anything that looks slightly interesting. That way you can read in advance about problems other people are having and what parts of the API they found useful. I learn a ton this way.
And post your problems here -- people are fantastic about helping us newbies.
Wow, my first post here, and it's a reply rather than a question! I definitely recommend the book that I am currently reading "Beginning Java Objects: From Concepts to Code" by Jacquie Barker. I bought it on Amazon. [ October 04, 2005: Message edited by: Tony Shivpershad ]
Joined: Dec 06, 2001
Sun also provides an online tutorial to help get you started on different parts of the API. As you learn the API, you should become familiar with and learn how to navigate the API documentation. See the links in my signature for both the tutorial and the API docs.