views:

649

answers:

7

So I'm going to a job interview next week at a Java place, and would like to not come across as clueless. I'm a pretty confident C#/.NET developer and am (clearly!) willing to consider jumping ship to Java - I'd like links to resources people would recommend for doing this. I'm interested in answers to questions like:

  • Any guides that are a rough equivalent to Justin Etheridge's Ruby for C# developers? That was really useful when I decided I wanted to learn Ruby's rake (and thus at least a little Ruby). There seem to be more pages for people going the other way, though...
  • Which IDE to use? I've actually already bought my own IntelliJ because I love its HTML/CSS/JS, but haven't touched its actual raison d'etre of, well, "that Java stuff". I suspect the place I'm going to uses Eclipse, however. So - recommended resources to get up and running on a Mac or Windows (I'm not fussy)?
  • It's probably going to be a TDD coding interview; I guess JUnit is the de facto choice to learn a little about here?

Thanks in advance.

+5  A: 

Take a look at this link which details many of the differences between the two languages.

As for IDE many people like Eclipse or Netbeans (My favorite) - Both are free. As you already own IntelliJ you could try that.

FYO some of the main differences are:

  • Lack of properties / auto properties
  • No 'event' type (Different way of dealing with events)
  • foreach loop syntax
  • 'Generics' implementation
  • Checked exceptions

and probably many more :)

Richie_W
Netbeans is my favorite also!!!
Lucas McCoy
+1  A: 

As you mentioned, for an IDE you should consider Eclipse, which is free and a decent IDE for basic development. If you're going to be working with JEE, however, it may not be sufficient, but it will help you learn the basics quickly.

There are many books that cover basic syntax and programming style, and any, assuming that you are a good C# developer, will probably be enough to get you going. I don't know of any off-hand of the type you mentioned.

I recently did the transition in the reverse, going from Java to C#. I found that by rewriting an existing application in the new language made it much easier than I had thought it would be.

Elie
+1  A: 

Netbeans is the best (and most like visual studio) IDE out for java developers. You will love it if you have enough RAM for it.

Lucas McCoy
+3  A: 

IDE

You got IntelliJ. Believe me its the best. I used it for two years, then had to switch to some free thingy. I tried Eclipse, it was a pain, no offense just telling you my experience. Now, working with Netbeans, and I am quite happy, but still miss IntelliJ once in a day.

TDD

Yes, you are very much right about JUnit. After enough understanding, its good to look at other specialize libraries like HtmlUnit, DBUnit. Further, a code coverage tool like Cobertura, or Emma. As you must go with IntelliJ, you will probably like to check out Emma, as its having a good integration with the IDEA.

Transition

I don't think you will have a hard time in the transition. IMO, reading the docs and the specs will get you going. May be you can go for some books down the road, but as far as core Java is concern, reading API docs and specs will be a good start. You can make use of a SO to ask question. I have seen many questions like "C# equivalent in Java ..".

Adeel Ansari
+1  A: 

If you have a week - try and write as much Java code as you can.

I found it very easy to go from Java to C# and it should be the same the other way.

Pick up a copy of Effective Java and read it through - it's very good indeed.

Fortyrunner
A: 

I think the biggest difference is the community and environment surrounding the two platforms. In .NET world, Microsoft makes big decisions and rolls out feature sets. On the other hand, there are many third-party libraries in the Java world that almost supplements the platform, and you are supposed to know them if you are into certain kind of development. See Most useful free Java libraries.

eed3si9n
+1  A: 

Since you've only got a week, I would echo the recommendation to focus on the sort of things pointed out by Effective Java.

Know the Collections API. When I interview folks, it's one way I weed out folks. Especially know the difference between equals(), hashCode() and compareTo(), and what it takes to implement them correctly.

Know how to handle exceptions in Java, and how it interacts with standard EJB transactions.

If you're fortunate to land the job, I would spend some time getting to know the J2EE landscape, which is quite vast. These days, I would consider fundamentals of J2EE to be EJBs, MDBs, servlets and JPA.

I wouldn't worry so much about the IDE, or the xUnit API. Those things are trivial for any decent developer with experience.

Alan