Java vs C/C++
Home ] Up ] Why Java? ] History of Java ] Java Design Goals ] [ Java vs C/C++ ] Applications vs Applets ] Java and the Internet ] Common Java Misconceptions ]

 

 

A Java program differs from a C program in:

(Ref: Java in a Nutshell (2nd Edition), by David Flanagan, O'Reilly and Associates, 1997)

  • Program Structure and Environment
  • The Name Space: Packages, Classes and Members
  • Comments
  • No Preprocessor
  • Unicode and Character Escapes
  • Primitive Data Types
  • Reference Data Types
  • Objects
  • Arrays
  • Strings
  • Operators
  • Statements
  • Exceptions and Exception Handling

In addition, a Java program differs from a C++ program in:

  • Object Model
  • Class Syntax
  • Multiple Inheritance vs. Interfaces
  • Richer Set of Class Libraries
  • Class Constructors
  • No Class Destructors
  • Finalizers and Final Methods
  • Access Specifiers vs. Visibility Modifiers
  • Abstract Classes
  • No Templates
  • No Operator Overloading
  • No Conversion Functions

We'll be going into detail on each of these topics later...

 

This page was last modified on 02 October, 2007