Tuesday, 12 July 2011

What are the major differences between C and Java

                                                  
                                 C                                                                              JAVA                                                
          
1.  'C' was designed to be compiled.


2.  'C' is platform-dependent.


3.  It does not use classes.


4.  It does not implement the object-oriented model.


5.It does not employ encapsulation mechanism.


6.  It does not employ inheritance mechanism.


7.  It does not employ abstraction mechanism.


8.  It does not employ polymorphism.


9.  It does not employ exception handling mechanism.


10.  All applications must have a main() method
1.   'JAVA' was designed to be interpreted.


2.   'JAVA' is platform-independent.


3.   It do use classes.


4.   It implements the object-oriented model.


5.   It employs encapsulation mechanism.


6.   It employs inheritance mechanism.


7.   It employs abstraction mechanism.


8.   It employs polymorphism.


9.   It employs exception handling mechanism.


10.  Only stand alone applications must have a main() method.


List of five major c++ features that were intentionally removed from Java

Java was designed in such a way that it is similar to C++, in order to make the system more comprehensible.There are few features in C++ that were not frequently used,because they were a bit confusing and could not benfit any programmer.
Those features were not included in Java.Thus,Java's syntax became the more cleaner version of C++'s syntax.

The list of C++ features that were intentionally removed from Java are:

1.   Header files
2.   Pointer arithmetic (or a pointer syntax)
3.   Operator overloading
4.   Virtual base classes
5.   Structures
6.   Unions etc.

What are the advantages of object oriented technology

Advantages:

->Object oriented programming provides useful features like encapsulation,inheritance and polymorphism,not available in traditional programming.

->It is closer to real life representation of objects.

->Hierarchical relationships can be represented using inheritance.

->Data can be divided as public and private,also we can provide an interface for entering and validating data by means of class properties.

->Program development becomes easy due to increased modularity.