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 are some good logical programming questions for php interview?
1. What is the full form of PHP and what is the PHP? Ans: the full form of PHP is Hypertext Pre-processor. Php is server-side scripting language and Its open source and freely available. PHP easily...
Rakes
0 0
5
i recently completed my M.Tech EEE is it the right choice to learn Python now. And i completely have interest in programming only if available get me the tutor details.
This would be a great time to start learning python. With the increase in the amount of data being generated every day + improved compute efficiency, there is revolution that is taking place in data analytics...
Adupa
Can include files be nested?
one line can only include one directory. No nesting is applicable.
Himangi
0 0
7

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

Ask a Question

Related Lessons

How to work fast while working on MS Excel?
Many people struggle to find out the way on how they can work faster while working on MS Excel/Access or VBA. let me share the tip for that. If you are new or working since long time on Excel/Access...

5 Key Benefits of Internship
As many of my connects are about to complete their graduation and post graduation, its been my good advice to them to find internship. Let me throw some light in this article on that area. An internship...
S

Shekhar Pawar

0 0
0

Polymorphism and Virtual Functions
Polymorphism and Virtual Functions Compile Time Polymorphism or Early Binding or Static Binding An object is bound to its function call at compile time. Implemented using overloaded functions and...

Using the Math Library in Python
Using the Math Library in Python. Python provides many useful mathematical functions in a special math library. A library is a module that contains some useful definitions. We now consider...

Array vs Linked List
Array Linked List Accessing element is easy. Accessing element is difficult compare to Array. Easy to use. Difficult to use. Memory is Fixed size. Memory is variable size. If...

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