Hi guys, i would like to learn Java to create cross platform desktop application. I know Java syntax, but i'm trying to learn Java Api. Does exists some book / resource that help learning main core Java API, the Swing, etc ? I'm new to Java and i'm little confused because of the "Mastodontic" API !!! Thanks in advance
I don't think anyone knows all the Java API. It's quite large. You learn bits and pieces of it as you use it.
The best advice I have for you is to keep the API bookmarked and look at it often.
Thinking in Java is an very popular book for learning Java and associated APIs. The N-1 edition is available for free download, from the book's site.
I found the official tutorials quite helpful too, particularly when diving into file and network IO.
This famous question has some good starters, take a look. Most Java books focus on the API, btw.
If you are interested in Swing, I have found Java Swing, published by O'Reilly, to be invaluable while learning it. It is a little dated (1.4), but it is still mostly correct and up to date.
These introductions from Java creator Sun Microsystems (now part of Oracle) look at a glance like something I wish I'd had when learning.
The decade-old books below by David Geary were my original introduction to Swing. I still find myself referring to them on occasion. APIs that have changed have typically been extended rather than overhauled.
Learn the .NET Framework instead. .NET programmers get paid more, and the new Windows Phone supports XNA games. Some games made for the XBOX have been easily ported over to Windows Phone. Furthermore, Silverlight is also supported on Windows Phone. Don't waste your time learning a dying language.
The same Silverlight application can also run on both the Web, Desktop, or on a Silverlight Enabled Phone such as the Windows Phone, and Nokia is jumping on the Silverlight bandwagon.
Additionaly, as someone is concerned .NET can be ran on multiple platforms. There are several runtimes available; the most popular being MONO.
One approach is to always pick a well-known problem to solve and use a new language, be it Java, or C#, or whatever to program it. The benefit of using a well-known algorithm is that you don't get bogged down in the details of implementation and understand the problem so you can concentrate on solving it. you should pick something small but complicated enough to touch on multiple concepts. Database and Network connectivity, Multi-threading, UI, Events, to name a few. this will put you fast into the details of the language from multiple perspectives. One such algorithm is a game "Bulls and Cows", where you guess digits in 4 positions and get a "Bull" if you guess both position and number and a "Cow" if you only guess the number. Write this game in Java and play against the computer, then write it for the computer to play against a computer, then do a p2p and you will be well versed in Java API in no time :)
As others said, no need to worry about the size of the standard class libraries. You'll learn those on an as-needed basis.
Instead of getting any of the huge "API reference" style books (most of which are out of date anyway), I think you should heed Bill the Lizzard's advice in the "best Java book" question:
Head First Java is great for beginners.
Effective Java will take you from journeyman to master.
The Head First book is a widely praised intro to Java, and covers Swing basics too. For up-to-date API details, always keep the online docs close at hand. Also, to avoid some common pitfalls, I recommend checking out these SO questions: