Presentation is loading. Please wait.

Presentation is loading. Please wait.

C++ & Java Dick Steflik CS-248. Similarities Syntax - almost identical Object Model - very similar Stream based I/O.

Similar presentations


Presentation on theme: "C++ & Java Dick Steflik CS-248. Similarities Syntax - almost identical Object Model - very similar Stream based I/O."— Presentation transcript:

1 C++ & Java Dick Steflik CS-248

2 Similarities Syntax - almost identical Object Model - very similar Stream based I/O

3 Philosophically C/C++ were both developed for building desktop applications (an OS is a desktop application) and as such have the goal of fast desktop applications with reasonable network performance Java was developed for building network applications and as such goes to great lengths to minimize network transmission times with reasonable desktop performance and good built-in security

4 Differences Java - no pointers Java - no destructors Java - automatic garbage collection Java - no linkage editor, all linking is dynamic at run time Java - fully object oriented, cannot write procedurally Java - no header files

5 #include –C/C++ compiler directive for an external file to be included, inline with the source prior to compiling –#included code is compiled along with the source code

6 #import –Java compiler directive to make available to the compiler Java packages and/or class files –#imported code is separately compiled and linked dynamically at run time –#imported code doesn’t affect the size of the compiled class file

7 Object Model Java - all objects are subclasses of class Object, a single root to the class hierarchy C++ - there is no single root to the class hierarchy

8 Inheritance Java - single inheritance only –make things simpler, due to single root of object hierarchy C++ - single and multiple inheritance –because there is no common root to the class hierarchy multiple inheritance is sometime required –complex to code and debug


Download ppt "C++ & Java Dick Steflik CS-248. Similarities Syntax - almost identical Object Model - very similar Stream based I/O."

Similar presentations


Ads by Google