UrbanPro

Learn Programming Languages from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is difference between C++ and Java?

Asked by Last Modified  

Follow 0
Answer

Please enter your answer

Expert in IT

The main difference is that C++ is object oriented and JAVA is purely object oriented language. Which means even though C++ follows OOPS concept it also have some features that violate the OOPS concept, such as pointers, operator overloading etc. But JAVA do not support any of these feature that...
read more
The main difference is that C++ is object oriented and JAVA is purely object oriented language. Which means even though C++ follows OOPS concept it also have some features that violate the OOPS concept, such as pointers, operator overloading etc. But JAVA do not support any of these feature that violate OOPS concept. read less
Comments

Tutor

Let me tell you what exactly is the difference . When you compile a c++ source code it gets converted to an executable code. This executable code that is generated contains instruction set specific to the particular system architecture (i.e 32 bit or 64 bit) and particular Operating system calls. But...
read more
Let me tell you what exactly is the difference . When you compile a c++ source code it gets converted to an executable code. This executable code that is generated contains instruction set specific to the particular system architecture (i.e 32 bit or 64 bit) and particular Operating system calls. But in-case of java , when you compile a java source code it gets converted as byte code which independent of any system architecture or native operating systems calls. Jvm is os dependent and when your class file goes through jvm it gets converted as native machine code. read less
Comments

IT Professional Trainer working with a reputed Institute. Headquarters: Hyderabad

C++ can be used as a conventional programming language; it also supports Object Oriented Programming. So we can call it as Hybrid Programming Language. But JAVA is a fully Object Oriented Programming Language suitable for creating Web Application / Website etc.
Comments

Both Java and C++ support object oriented programming, yet there are differences between them. To begin with, Java is a pure object oriented programming language; therefore, everything is an object in Java (single root hierarchy as everything gets derived from java.lang.Object). On the contrary, in C++...
read more
Both Java and C++ support object oriented programming, yet there are differences between them. To begin with, Java is a pure object oriented programming language; therefore, everything is an object in Java (single root hierarchy as everything gets derived from java.lang.Object). On the contrary, in C++ there is no such root hierarchy. C++ supports both procedural and object oriented programming; therefore, it is called a hybrid language. read less
Comments

ThinQ Proffessional Tutors

There are many differences between C++ and Java.But which are the key difference are enlisted. 1.C++ is more a procedure oriented Language which supports some OOP concept , whereas Java is purely Object Oriented. 2.C++ is not Portable, while Java is portable. (Java produces intermediate code called...
read more
There are many differences between C++ and Java.But which are the key difference are enlisted. 1.C++ is more a procedure oriented Language which supports some OOP concept , whereas Java is purely Object Oriented. 2.C++ is not Portable, while Java is portable. (Java produces intermediate code called Java Byte Code which is machine Independent (So it is Portable), By using a JVM (Java Virtual Machine) which can convert it to machine dependent Code). These are the main difference, others are enlisted in other replies. read less
Comments

Passout from IIITb, Worked in many countries.

There are number of difference between java and C++ + less memory models Java allocates all its objects on the heap (all managed by the garbage collector); C++ additionally offers stack based instantiation (including temporary objects), and static instantiation. Stack objects are automatically deleted...
read more
There are number of difference between java and C++ + less memory models Java allocates all its objects on the heap (all managed by the garbage collector); C++ additionally offers stack based instantiation (including temporary objects), and static instantiation. Stack objects are automatically deleted (when they go out of scope), so a programmer has to assure no references are kept further (e.g. in a container, registry, etc.). Instantiation order with static instantiation is difficult to predict, and therefore error-prone, less portable, and restricted. + no temporary objects [Based on non-trivial rules] C++ language will chose either a cast or temporary object (including object construction) to [implicitly] coerce one type into another, sometimes leading to unwanted effects or unwanted overhead. + no copy constructor and assignment operator needed Due to Java's memory model, no copy constructor and assignment operator are needed, and therefore can't become a source of bugs. + no explicit cast code supported C++ increases the number of routes for type coercion by allowing to defined explicit cast code. + no ambiguity between int, boolean, and null pointer Due to false and null both being distinct from 0 there's no ambiguity if used e.g. as parameters in overloaded methods3. + no default parameters As not supported, there can't be an ambiguity between methods with default parameters and other overloaded methods. + no unsigned integers As unsigned integers don't really buy anything (in C/C++ neither, decent casts can be used), they're omitted. ~ const not supported Object immutability is in Java at most considered via annotation4. The more intuitive final modifier allows to implement first-level constness on variables and fields (again being more intuitive than C++'s reference fields). ~ expression evaluation order Evaluation order within expression is stricter defined in Java, leading to more deterministic behavior, and avoiding a specific source of problems. C++ compiler however may allow options to warn about undefined semantics outside of sequence points. ~ no macro pitfalls Macros offer call-by-name semantics and therefore allow unwanted side effects, e.g. with multiple evaluation (max(i++,j++)), or precedence issues (with missing parentheses).5 read less
Comments

Software Professional Trainer with 26+ years of Experience in Software Design and Development

Java is pure object oriented programming language. C++ is not pure object oriented programming language. Java Runs in a virtual machine. C++ Runs as native executable machine code for the target instruction set. Java does not support Pointers, references. C++ Supports Pointers, references. Java...
read more
Java is pure object oriented programming language. C++ is not pure object oriented programming language. Java Runs in a virtual machine. C++ Runs as native executable machine code for the target instruction set. Java does not support Pointers, references. C++ Supports Pointers, references. Java memory management done using automatic garbage collection. C++ Memory management can be done manually through new / delete. Java supports Single inheritance of classes. Supports multiple inheritance via the Interfaces construct, which is equivalent to a C++ class composed of abstract methods. C++ supports Single and Multiple inheritance of classes, including virtual inheritance. read less
Comments

Both are object oreinted programming languages, but java is said to be purely object oriented pgmng language. In C++ it use compiler for debugging.but java is both compiled and interpreted, and java is used in network based applications, its a highly secured language too and machine independent is...
read more
Both are object oreinted programming languages, but java is said to be purely object oriented pgmng language. In C++ it use compiler for debugging.but java is both compiled and interpreted, and java is used in network based applications, its a highly secured language too and machine independent is other feature of java. read less
Comments

Technical and Soft Skills Training on 35+ Subjects

The following three links nicely explain the differences between Java and C++: 1) http://en.wikipedia.org/wiki/Comparison_of_Java_and_C%2B%2B 2) http://cs-fundamentals.com/tech-interview/java/differences-between-java-and-cpp.php 3) http://www.dickbaldwin.com/java/Java008.htm
Comments

c++ and java both are object oriented. the difference is c++ is possible without using class but java is only on based on class.
Comments

View 11 more Answers

Related Questions

what is copy constructor?
The copy constructor is a constructor which creates an object by initializing it with an object of the same class, which has been created previously. The copy constructor is used to: Initialize one object...
Hiteshwar
Which is better, PHP or Python? Why?
Python . Simple syntax,More readable,General purpose programming language
Kartheek
0 0
5
Which is a better programming language to learn from Job point of view - Java, Python or Android ??
Java you should go for as career option , java will much larger platform because most of the applications are developed in java,
Pratik Soni
How many of you know about 'Perl 6' ? There is no foreach concept in latest Perl and it has introduced many more. Let us discuss the new features of Perl here.
It has more inbuilt functions too...also they have introduces command like sequences. Is there anyone who installed rakudo for checking Perl 6.
Devi Killada
0 0
6

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Student Project Development: How To Go About It?
A lot of students (count me as well) in their final year of IT course are confused and overwhelmed about their Project development. Final Year IT Projects are a crucial milestone in every IT students educational...

Data Structure: Searching
Searching Searching means finding an element in an array. There are two type of searching techniques : Linear Search Binary Search In linear search, to find the element array is traversed and...

Write your first Python program in 10 minutes
1. Download python from python official site search "python download" in google 2. Install in your machine 3. verify using : "python --version" command 4. Write first program using notepad create...

My first C++ program
# include using namespace std; int main() { cout<<"Welcome to C++"; return 0; } Use IDE such as CodeBlocks to run this program. To do this, open CodeBlocks, Goto File->New->Empty File. Copy...

C, C++, JAVA Tutor
* Program to swap two numbers using a temporary variable with each statement explained with comments * #include // headerfile for cout statement using namespace std; //...

Recommended Articles

Software Development has been one of the most popular career trends since years. The reason behind this is the fact that software are being used almost everywhere today.  In all of our lives, from the morning’s alarm clock to the coffee maker, car, mobile phone, computer, ATM and in almost everything we use in our daily...

Read full article >

Almost all of us, inside the pocket, bag or on the table have a mobile phone, out of which 90% of us have a smartphone. The technology is advancing rapidly. When it comes to mobile phones, people today want much more than just making phone calls and playing games on the go. People now want instant access to all their business...

Read full article >

Information technology consultancy or Information technology consulting is a specialized field in which one can set their focus on providing advisory services to business firms on finding ways to use innovations in information technology to further their business and meet the objectives of the business. Not only does...

Read full article >

Applications engineering is a hot trend in the current IT market.  An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...

Read full article >

Looking for Programming Languages Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Programming Languages Classes?

The best tutors for Programming Languages Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Programming Languages with the Best Tutors

The best Tutors for Programming Languages Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more