Java A Tutorial for Migration from C++
What is Java?
- An object-oriented programming language that runs on a Java Virtual Machine (JVM). A JVM is a program that interprets the Java language, JVM’s for different operating systems all interpret Java in the same way…
- Java is platform independent. e.g. Write code on Windows, Run on Linux. In practice, C++ is platform dependent e.g. Write code on Windows, Change (break) code to work with Linux, Run on Linux (now have 2 versions!)
- Java was designed for a networked world. Java applets for the web; Execute code remotely
Classes
Similarities to C++:
- Constructors
- Member variables and methods
- Access modifiers (public, private, protected)
- Note: Slight differences within all of the above
Differences:
- No copy constructors
- No destructors (finalizer is equiv. but rarely needed)
- File structure: Each public class must be in a file named after that class, No separation of declaration and definition (no header files)
Language Choice
Java vs. C++
- Java simpler, more portable, designed for web
- C++ faster
- Java development time half of C++
- C++ still faster
- Java’s getting faster! 20% to 50% as fast with JIT (common estimates on web), Just as fast or faster than C++ (reference at end), Contentious… But gap is shrinking
Java vs. .NET
- Microsoft’s version of JVM
- C# has some attractive features
- portability of .NET dubious
Language choice is an engineering decision
Download file here
Incoming Search Terms : c to java migration approches:ppt, MIGRATION FROM C TO JAVA