What is the difference between C++ and java?

Answer Posted / ridicule

The main difference b/w c++ & java is:
* c++ is a platform dependent language.
* but java is platform independent language.it can be run
on every system which contain java virtual machine(jvm)

*both use oop concept,
we can write a c++ pgm without using class but class is
must in java;
that is java is pure oop language

Is This Answer Correct ?    24 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is encapsulation with example?

578


What is difference between multiple inheritance and multilevel inheritance?

603


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1458


What causes polymorphism?

575


What is the significance of classes in oop?

590






i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

1835


Why is polymorphism important in oop?

629


Where You Can Use Interface in your Project

1425


What is encapsulation example?

545


when to use 'mutable' keyword and when to use 'const cast' in c++

1642


What is the types of inheritance?

602


How is polymorphism achieved?

583


#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2166


#include #include #include #include void select(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); select(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void select(char *items, int count) { register int a, b, c; int exchange; char t; for(a = 0; a < count-1; ++a) { exchange = 0; c = a; t = items[ a ]; for(b = a + 1; b < count; ++b) { if(items[ b ] < t) { c = b; t = items[ b ]; exchange = 1; } } if(exchange) { items[ c ] = items[ a ]; items[ a ] = t; } } } design an algorithm for Selection Sort

2066


write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

1793