Java for C# developers

The language itself should be simple to understand. There are not as many language constructs, everything possible is done in libraries.

The libraries will take some getting used to. The two most critical things you can do to hit the ground running is:

1: Use NetBeans or Eclipse and hit ctrl-space ALL THE TIME. It’s like the god key.

2: bookmark this page: https://docs.oracle.com/javase/8/docs/
(or the one appropriate for your version of java–but the version doesn’t matter all that much) Each box in the graphic represents a library package, click one ones that you want to have an overview of. Try to get a handle on what each package does. Browse the packages that are of interest and scan the classes. This page also links to a lot of tutorials.

After that it’s just a matter of learning what other libraries you’ll need to do your job. there is a lot to J2EE if your group uses that, you’ll probably end up using Hibernate, and you should look into messaging & maybe RMI (you may not be using it directly, but nearly all intra-java communications are based on RMI).

remember ctrl-space. It will give you parameters, lists of functions that match what you’ve typed so far, it fills in import declarations, it expands macros, …

Oh, and two other Eclipse tricks:
ctrl-shift-T. “Lookup Type” (in eclipse, there is one in NetBeans but I can’t remember the key sequence, ctrl-shift-O maybe). Anyway, you type in a partial classname and it will give you a list of ALL matching classes in your project. Click one to open it.

ctrl-click. Jumps to the declaration/definition of whatever you click on.

Leave a Comment