Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java for C# developers

What is the fastest-track set of resources for a C# developer wishing to hit the ground running in an enterprise-class Java team?

like image 768
Pita.O Avatar asked Feb 17 '09 00:02

Pita.O


People also ask

Can I use C with Java?

Java native interface (JNI) is a framework provided by java that enables java programs to call native code and vice-versa. Using JNI a java program has the capability to call the native C code.

What is Java in C?

C is a compiled language that is it converts the code into machine language so that it could be understood by the machine or system. Java is an Interpreted language that is in Java, the code is first transformed into bytecode and that bytecode is then executed by the JVM (Java Virtual Machine).

Which is better C or Java?

C is a procedural, low level, and compiled language. Java is an object-oriented, high level, and interpreted language. Java uses objects, while C uses functions. Java is easier to learn and use because it's high level, while C can do more and perform faster because it's closer to machine code.

Is C# easier than Java?

Java vs C# Summary Java has a focus on WORA and cross-platform portability and it's easier to learn. C# is used for everything Microsoft, and it's harder to learn. If you are new to coding, it's astonishingly easy to feel overwhelmed.


1 Answers

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.

like image 116
Bill K Avatar answered Sep 19 '22 23:09

Bill K