I dont know Java and I am learning it. I studied in a book that
1. Java codes for the same program done in C++ is much lesser in size.
2. Java is truely object oriented but C++ is not so eventhough it is object oriented.
3. Java does not has pointers,header files(#include). But to my practice I feel import does something very close to #include
4. It does not uses some C++ concepts like operator overloading which is responsible for great problems and codes that are difficult to debug.
5. Java is very portable. It does not create .exe file but .class file that run almost in all types of system.
6. Java has both interpeter and compiler.
7. Java is like a cousin of C,C++ .So Java can use the functions of C,C++.
Disadvantages of Java over C
1. Java does not create .exe file
2. Java is a bit hard to understand.
3. Java does not create the class file with the name we give. But with the name of the class that contains the main function.
I am not sure of the above answer and its the first answer i provide in Yahoo answer.
Best of luck
2006-09-19 01:04:57
·
answer #1
·
answered by Gopinath M 3
·
0⤊
0⤋
C++ has a dirty little secret: You can't rely on the language to do any of your work for you, it got that from its older brother C.
Java has a dirty little secret too: You can extend the packages for use with Java if you know how to program in C++. OOPS!
You figure out which is better when and why on a case by case basis. Not by some silly "My language is better than yours!" schoolyard brawl. Each has its own strengths and weaknesses, sometimes the strengths *ARE* the weaknesses when you need to do something funky.
P. S. Java is not only an object oriented language, it can be modular also. It is considered to be always object based, since the "libraries" it uses (called packages) are actually objects created with Java or C++. There is a difference between object based and object oriented. C++ is object oriented and can also do modular programs without any objects at all. Java must use some facilities from an object package, so it is said to be object based. It also has the facilities to write its own objects, and so it too is object oriented. So Java is object oriented and object based.
2006-09-19 04:46:50
·
answer #2
·
answered by Anonymous
·
0⤊
0⤋
Java like C# and co. are on an Internet level like Website and pages and networks, while C++ is better as local software like in drivers.
So there is no definitive word Java is better or C++ is, they just don't compete in the same problem domain.
2006-09-19 01:30:08
·
answer #3
·
answered by Andy T 7
·
1⤊
0⤋
Java is developed for solving certain set of problems,
c++ is designed to solve a different set of problems,so the question has no relevance.Java & c++ co-exist for years.
Java follows the syntax structure of c++,so it is easy for a
programmer to study & excel in java who is having certain
basics in c++.
good luck
2006-09-19 01:50:58
·
answer #4
·
answered by Anand 3
·
0⤊
0⤋
-the performance of Java programs sucks.
-c++ is a 'hybrid' language, u can do structured and object oriented programming at the same time
2006-09-19 01:19:04
·
answer #5
·
answered by happy_84 k 4
·
0⤊
0⤋
because of the shortcoming of c++ is that it does not provide the good interface via graphics. java can be connected to dbms easily, c++ can also b connected but it's a tough job
2006-09-19 01:00:21
·
answer #6
·
answered by anoop_singh_18 1
·
1⤊
2⤋
Platform independence ,ambiguity of pointers,pure object oriented programming make better than c++
2006-09-19 01:02:05
·
answer #7
·
answered by ch_nagarajind 3
·
1⤊
1⤋
I disagree, c++ is better.
2006-09-19 00:56:20
·
answer #8
·
answered by Anonymous
·
1⤊
0⤋