Skip to main content

What is the Difference Between JAVA and C++ ? compare both of them.

                  Difference Between JAVA and C++

» Java is platform independent while C++ is not.
Platform independent means it can be implemented and operated on various platforms without any compatibility problem.

» Output of Java code is bytecode while in C++ it is executable file.
When we compile any JAVA program then an output file is generated which has .class extension, this file is called bytecode. While when we compile C++ file then an executable file is generated which has .exe extension

» Java does not support Pointer while C++ supports.
Because java provides a secure platform and use of pointers in any language makes it insecure by various means.

» Java does not support Structure and Union while C++ supports
These were felt to be redundant since the class encompasses them.

» Java does not support operator overloading while C++ supports.
Operator overloading causes ambiguity in programs that’s why JAVA does not support this

» Java only supports Constructor not Destructor
However you can implement destructor using finalize( ) function

» JAVA does not allow Default Arguments while C++ allows
A default argument is an argument to a function that is not required to specify when calling the function because it is already specified by the programmer in function declaration.

» Java does not support multiple inheritance while C++ supports it
However in JAVA “Multiple Inheritance” can be implemented by multi-level and hierarchical inheritance.

» In JAVA objects can be passed by reference only while C++ supports both (Pass by Reference and Pass by Value)

» Java does not support typedef

» Java does not allow the goto statement.

» Java does not support the delete operator.

» Java does not perform any automatic type conversions.

Comments

Popular posts from this blog

CREATE WHATSAPP GROUP INVITATION LINK

How to create Whatsapp group Invitation link [Now available in Original Whatsapp also] Hello friends, now you can create your own group invitation link in whatsapp to add members themselves. If you want to create a group invitation link then read all. It is very simple method. Below, the page is looking long because I have given in full details with screenshots. Requirements:  You must be  Admin  of that group. Whatsapp Nano .  Click here  to download. Patience. STEP 1: Go to that  group  which you want to create a link. STEP 2: Click to  menu  (i.e. 3 dots). STEP 3. Click on  Group info . STEP 4: Click on  Add participant.. STEP 5:  Here, click on  Invite to group via link .                                                 STEP 6:  Copy  the given link.    ...

Hack Android Games Without Root Access For Unlimited Coins And Level Ups

Hack Android Games Without Root Access For Unlimited Coins And Level Ups                                          Things you need: Android Device Lucky Patcher ( Download ) Note:  Lucky Patcher is Both for Rooted and Non-Rooted device, for rooted device Lucky Patcher will ask for root access. you will have to grant the access. Before doing any Hack play the game for a minute that you wan’t to hack.                                          Step 1:  Download and install lucky Patcher ( Download ). Step 2:  In this tutorial, I am showing you an example with the most popular Android game Subway Surfer. All you have to do is Open lucky patcher and Tap on the game that you need to hack.                  ...

HOW TO PUBLISH EMPTY STATUS AND COMMENTS ON FACEBOOK

You Must Have seen your Friends Who Knows This Trick Publishing Empty Status And Comments On Facebook, But When Ask Them How they Do it? They Won’t Answer You. Now its Time to Show Your Friends That Even you Know the Trick To Publish Empty Comments and Statuses. Steps: Step 1: Login To Your Facebook Account. Step 2: Copy This Code > @+[0:0: ] and Paste it in Status Box and Click on Post.(Please remove                   “+”sign before posting)                                                                    OR Click On Status Box, Press and Hold ” Alt ” and Press 0173. Leave Alt key and click on Post. See the magic. (Please remove “+”sign before posting) Update: Recently On Facebook I Noticed That if You Comment “0? In any posts, then it sh...