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 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

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

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

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

IT Professional Trainer with 15 years of experience in IT Industry

Both Java and C++ support object oriented programming, yet there are differences between them. Differences are: 1. Java does not support pointers, templates, unions, operator overloading, structures etc. But C++ supports structures, unions, templates, operator overloading, pointers and pointer arithmetic....
read more
Both Java and C++ support object oriented programming, yet there are differences between them. Differences are: 1. Java does not support pointers, templates, unions, operator overloading, structures etc. But C++ supports structures, unions, templates, operator overloading, pointers and pointer arithmetic. 2. Java support automatic garbage collection. It does not support destructors as C++ does. 3. Java does not support conditional compilation and inclusion. Where Conditional inclusion (#ifdef #ifndef type) is one of the main features of C/C++. 4. Java has built in support for threads. In Java, there is a Thread class that you inherit to create a new thread and override the run() method. But C++ has no built in support for threads. C++ relies on non-standard third-party libraries for thread support. 5. Java doesn't provide multiple inheritance, at least not in the same sense that C++ does. C++ does support multiple inheritance. The keyword virtual is used to resolve ambiguities during multiple inheritance if there is any. 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

Experienced IT Trainer/Coach, Founder Win Corporate Training, Counsellor

C++ and Java both are Object oriented programming languages. C++ is used for system side programming and Java is used for application development. C++ supports pointer and java will not support pointers.
Comments

View 11 more Answers

Related Questions

Why does â??5/2 = 2â?? and not 2.5 in Python?
Due to dynamic Typing. use Numpy , and declare data type , you will get desired result
Srikanth
0 0
6
What purpose does \n have in C programming?
is used for new line. It prints the output in New or next line
Nasar
0 0
9
How do I send a C program via email?
upload your file in gdrive then use that link you can easily email that program
Furqankhan
0 0
5
Is it necessary to learn the C language and also C++ before joining an engineering college?
it is not necessary to learn C and C++, but if you want to make your are career in computer then learn C & C++ because these are basic computer language.
J.k.kavyadharshini

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

Ask a Question

Related Lessons

What is Safety-Critical Software?
A software whose failure may cause death or injuries to the users called Safety-Critical Software.The software present as part of Aeroplanes, or present in Rail as railway signalling software or Automotive...

Importance Of Function Prototype In C
Function prototype tells compiler about number of parameters function takes, data-types of parameters and return type of function. By using this information, compiler cross checks function parameters and...

Some Tricky Questions in C
Can you write two functions in which one executes before main function and other executes after the main function? #pragma startup #pragma exit Where, priority is optional integer value.For user priority...

Dynamic Memory Allocation in C using malloc()
#include <stdio.h>#include <conio.h>//#include <malloc.h> OR#include <stdlib.h>void main(){ int *ptr, i, n, sum = 0; printf("how many elements ? "); scanf("%d", &n);...

Decorator in Python - Simplified
By definition, a decorator is a function that takes another function andextends(/decorates) the behaviour of the latter function without explicitly modifying it.Let see how we can apply decorators for...

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