Tuesday, December 13, 2011

What are the differences between C and Java?

Differences between C and Java: The following are the simple differences between C and Java


C:
1. C is a platform dependent.

2. C does not uses classes.

3. C does not support encapsulation  and polymorphism.

4. C does not contain exception handling mechanism.

5. C is a procedural language.


Java:
1. Java is platform independent.

2. Java uses classes.

3. Java supports encapsulation and polymorphism.

4. Java contains exception handling mechanism.

5. Java is an object oriented language.