You are on page 1of 2

How To Differentiate Between C++ And Java

Introduction

In this article, you will learn what the difference between C++ and Java programming language is

Differentiation between C++ and Java

There are many differences and similarities between C++ and Java, given below-

Comparison C++ Java


Platform- C++ is a platform-dependent language. Java is a platform-independent
independent language.
Used for C++ is mostly used for system Java is mostly used for
programming. application programming.

Goto It supports goto statement. It doesn't support goto


statement.
Multiple inheritance It supports multiple inheritance. It doesn't support multiple
inheritance through class.

Operator It supports operator overloading. It doesn't support operator


Overloading overloading.
Pointers C++ makes use of the pointers. We can Java supports pointer internally
write a pointer program in C++. but we can't write the pointer
program in Java.
Compiler and C++ uses only the compiler. Java uses both compiler and
Interpreter interpreter.
Call by Value and C++ supports call by value and call by Java supports only call by value.
Call by reference reference both.
Structure and Union It supports structures and unions. It doesn't support structures
and unions.
Thread Support It doesn't have a built-in support for It has built-in thread support.
the threads. It relies on the third-party
libraries for thread support.
Documentation It doesn't support documentation It supports documentation
comment comment. comment.

Summary

Thus, we learnt, C++ is mostly used for system programming and Java is mostly used for an Application
programming and also learns many other differences between in C++ and Java.

You might also like