[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]


    Search the Q&A Archives


...difference between Java and C++....eg....speed.....

<< Back to: comp.lang.c Answers to Frequently Asked Questions (FAQ List)

Question by Baharuddin
Submitted on 2/23/2004
Related FAQ: comp.lang.c Answers to Frequently Asked Questions (FAQ List)
Rating: Rate this question: Vote
What is the difference between Java and C++....eg....speed...garbage collection...etc


Answer by hjgh
Submitted on 5/24/2004
Rating:  Rate this answer: Vote
ghhhhhhh

 

Answer by preet
Submitted on 10/7/2004
Rating: Not yet rated Rate this answer: Vote
java uses concept of oop's as c++ plus java is platform independent,having JVM as java virtual machine makes it possible for java programs to be run on any system having JVM installed on it.

 

Answer by someone in this world
Submitted on 10/8/2004
Rating: Not yet rated Rate this answer: Vote
what is this i want the answer and you ask me.  how do i no

 

Answer by someone in this world
Submitted on 10/8/2004
Rating: Not yet rated Rate this answer: Vote
what is this i want the answer and you ask me.  how do i know

 

Answer by KASHMIR
Submitted on 11/9/2004
Rating: Not yet rated Rate this answer: Vote
MALAY KO!!!!!!!!!!!!!

 

Answer by guyman
Submitted on 1/18/2005
Rating: Not yet rated Rate this answer: Vote
the lenght of the virtual engine loading time versus the size of the empirium of both divided by 2

 

Answer by faisal
Submitted on 1/29/2005
Rating: Not yet rated Rate this answer: Vote
java does not support operator overloading.
java does not support multiple inheritance.
java does not include preprocessor while c++ have.
and so on

 

Answer by Michael
Submitted on 9/11/2005
Rating: Not yet rated Rate this answer: Vote
Difference between Java and C++ is that Java does not support pointers. Pointers are inherently insecure and troublesome. Since pointers do not exist in Java, neither does the -> operator. Some other C++ features are not found in Java.
•  Java does not include structures or unions because the class encompasses
these other forms. It is redundant to include them.
• Java does not support operator overloading.
• Java does not include a preprocessor or support the preprocessor directives.
• Java does not perform any automatic type conversions that result in a loss of precision.
• All the code in a Java program is encapsulated within one or more classes. Therefore,                            Java does not have global variables or global functions.  
• Java does not support multiple inheritances.
• Java does not support destructors, but rather, add the finalize() function.
• Java does not have the delete operator.
• The << and >> are not overloaded for I/O operations.
• Java does not support templates.

 

Answer by kool_kavitha@yahoo.co.in
Submitted on 9/12/2005
Rating: Not yet rated Rate this answer: Vote
platform dependency

 

Answer by rakhi
Submitted on 9/19/2005
Rating: Not yet rated Rate this answer: Vote
i do not know

 

Answer by sumankumar
Submitted on 9/29/2006
Rating: Not yet rated Rate this answer: Vote
Java dostsupport Pointers,
C++ support pointers,Pointer used in program very confusion.and mainly Pointer's are user for Hacking Programs.

 

Answer by Nahid Ala m
Submitted on 12/6/2006
Rating: Not yet rated Rate this answer: Vote


 

Answer by g singh
Submitted on 3/15/2007
Rating: Not yet rated Rate this answer: Vote
There are two surface similarities between Java and C++. First, Java uses a syntax similar to C++, such as the general forms of the for, while, and do loops. Second, Java supports object-oriented programming, same way as C++.
There are also significant differences from C++, which fundamentally makes Java distinct from C++. Perhaps the single biggest difference between Java and C++ is that Java does not support pointers. Pointers are inherently insecure and troublesome. Since pointers do not exist in Java, neither does the -> operator. Some other C++ features are not found in Java.
Java does not include structures or unions because the class encompasses„h these other forms. It is redundant to include them.
Java does not support„h operator overloading.
Java does not include a preprocessor or support the„h preprocessor directives.
Java does not perform any automatic type„h conversions that result in a loss of precision.
All the code in a Java„h program is encapsulated within one or more classes. Therefore, Java does not have global variables or global functions.
Java does not support multiple„h inheritance.
Java does not support destructors, but rather, add the„h finalize() function.
Java does not have the delete operator.„h
The„h << and >> are not overloaded for I/O operations.
Java does not„h support templates.
Java shares many similarities with C++ as it relates to classes, but there are also several differences. By default, members of a class are accessible by other members of their class, derived classes, and by other members of their package. Therefore, class members are ˇ§more publicˇ¨ than they are in C++, however, the private access specifier applies only to the variable or method that it immediately precedes. All class objects are instantiated in Java using the new operator. Therefore, all class objects are dynamically allocated. When there are no references to an object, then the object is considered inactive.
Java includes two class-management features that help make using and organizing classes easier. The first is called a package, which defines a scope. Therefore, names declared inside a package are private to that package. Java uses file directories to store packages. Therefore, each package must be stored in a directory that has the same name as the packageˇXincluding capitalization.
Java, like C++, supports hierarchies of classes. However, the way that inheritance is implemented in Java differs substantially from the way that it is implemented in C++. Since multiple inheritance is not allowed in Java, then Java class hierarchies are linear. In Java, inheritance is referred to as subclassing. A base class in C++ is referred to as superclass in Java.

 

Answer by thepareek
Submitted on 4/4/2007
Rating: Not yet rated Rate this answer: Vote
http://www.javacoffeebreak.com/articles/thinkinginjava/comparingc++andjava.html

 

Answer by DEEPAK  J KESWANI
Submitted on 5/13/2007
Rating: Not yet rated Rate this answer: Vote
Perhaps the single biggest difference between Java and C++ is that Java does not support pointers. Pointers are inherently insecure and troublesome. Since pointers do not exist in Java, neither does the -> operator. Some other C++ features are not found in Java.

„h Java does not include structures or unions because the class encompasses these other forms. It is redundant to include them.
„h Java does not support operator overloading.
„h Java does not include a preprocessor or support the preprocessor directives.
„h Java does not perform any automatic type conversions that result in a loss of precision.
„h All the code in a Java program is encapsulated within one or more classes. Therefore, Java does not have global variables or global functions.
„h Java does not support multiple inheritance.
„h Java does not support destructors, but rather, add the finalize() function.
„h Java does not have the delete operator.
„h The << and >> are not overloaded for I/O operations.
„h Java does not support templates.

Java shares many similarities with C++ as it relates to classes, but there are also several differences. By default, members of a class are accessible by other members of their class, derived classes, and by other members of their package. Therefore, class members are ˇ§more publicˇ¨ than they are in C++, however, the private access specifier applies only to the variable or method that it immediately precedes. All class objects are instantiated in Java using the new operator. Therefore, all class objects are dynamically allocated. When there are no references to an object, then the object is considered inactive.

Java includes two class-management features that help make using and organizing classes easier. The first is called a package, which defines a scope. Therefore, names declared inside a package are private to that package. Java uses file directories to store packages. Therefore, each package must be stored in a directory that has the same name as the packageˇXincluding capitalization.

Java, like C++, supports hierarchies of classes. However, the way that inheritance is implemented in Java differs substantially from the way that it is implemented in C++. Since multiple inheritance is not allowed in Java, then Java class hierarchies are linear. In Java, inheritance is referred to as subclassing. A base class in C++ is referred to as superclass in Java.




 

Answer by venkatesh
Submitted on 7/17/2007
Rating: Not yet rated Rate this answer: Vote
my answer

 

Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.


Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

 

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

 

<< Back to: comp.lang.c Answers to Frequently Asked Questions (FAQ List)


[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.