tags:

views:

161

answers:

4

I'm thinking about learning Java. I'm already a more than competent c# developer. Has anybody else been in a similar situation? Roughly how long (whilst doing a typical 9-5 job) did it take you to transfer your skills? What resources would you recommend?

(When talking about resources, I specifically mean resources aimed at developers who want to learn Java, not newbie material)

+3  A: 

I'd recommend these books:

  • Effective Java (Joshua Bloch)
  • Core J2EE Patterns (Deepak Alur; John Crupi; Dan Malks) - sort of out of date, but still useful for understanding the history of J2EE. A lot of this is still applicable.
  • Concurrent Programming in Java (Doug Lea) - good guide to Java threading

Here's a more comprehensive list: http://www.javalobby.org/articles/5books/full.jsp

Andy White
+3  A: 

I studied Java at university, and did c# at work.

You will find the Sun Java API (Javadocs) to be very informative and will help you dearly. You can find it here. This website should be the first to consult if you need a query, as it is brief, and up-to-date - similar to the MSDN Library for c#.

Also, Java has a strong community who will be willing to help @ the forums.

Finally, I think its best to learn Java through practice and experimentation over theory. You will need a good IDE to start you off and there are plenty to choose from. Eclipse and Netbeans are notable Visual Studio contenders, but personally I prefer JCreator(albeit the version with intellisense is not free). It maybe text based, but you have greater control IMO.

If you are going to create GUI applications, then you should learn about swing. Again, the guys at sun provide excellent tutorials on the matter.

There are also books:

waqasahmed
+2  A: 

It shouldn't be a difficult switch. Java is pretty much a subset of C# (Operationally) since C# was a Java clone that has mutated since it was split. (Everyone here remember the fiasco when MS tried to embrace java by modifying it so it would only work with windows, was sued by Sun and then made J++ and C# instead?)

The biggest difference will probably be the libraries, but if you are proficient at C#, then you shouldn't need to do anything more than study the Javadocs to pick up the new libraries.

EE might be a bit of a jump, but that's a whole 'nuther world.

For me, the nicest thing about Java is the minimal syntax. There are very few surprises or tricky parts to remember (Well, Generics have a kind of tricky syntax to implement, but using them is pretty straight-forward). If you agree with this or not--it does tend to make the learning curve a bit more shallow.

Bill K
Ah yes, Visual J++. MS got sued for not implementing the full Java standard (e.g. JNI) and settled out of court for $20 million. I'm sure a lot of that knowledge (and code) went in to .NET (e.g. they had already implemented COM interop, P/Invoke, etc.). See http://radio.weblogs.com/0104813/stories/2002/06/09/aResponseToIsComInteropFundamentallyFlawed.html for a good list of J++ and .NET similarities.
Tuzo
+1  A: 

I started in Java and went to C#.

I will be honest with you; going back to Java won't be so easy, depending on how you started. It's going to change your world a bit. J2EE is quite different from ASP.NET, even though it looks a bit the same. Forget lots of things you used to hold dear, like == of strings, and switch on strings, and properties, and other such nicities. Oh, and prepare to be welcomed by checked exceptions.

Don't get me wrong, I love Java, and it's a great language, but you'll need be wary of the differences.

I would say a fun way to learn would be to write a program simultaneously in Java and C#, and see how you would do each thing, and note the differences.

I think you may find books hard to read, as they'll cover the basics, which will be boring for you, so you may skip critical things.

Learn by doing :) That is my approach.

Noon Silk
In many situations, a desire to "switch on strings" means you should be using an enum somewhere.
JeeBee