Home Answers Viewqa Java-Interview-Questions Difference between C++ and Java

 
 


Archana
Difference between C++ and Java
3 Answer(s)      5 years and 3 months ago
Posted in : Java Interview Questions

Basic difference between C++ and Java

View Answers

February 25, 2008 at 1:11 PM



Although both are object oriented programming language and Java was derived from C++ but still there is big difference between these two languages.

You can see the actual difference once you start programming on it.

But here i am going to give you few differences between these two...

1. Java does not support operator overloading

2. A class definition in Java looks similar to a class definition in C++, but there is no closing semicolon.

3. Forward reference declarations are not required in Java.

4. Scope resolution operator (::) required in C++ is but not in Java.

4. In C++ you have to re-declare static data members outside the class but such things are not required in Java

etc...


February 25, 2008 at 1:27 PM


First of all
Java, which emulates or imitates OOP?s principle, is very much similar to C++, but in C++ programming can be done without making objects.

Java is a high level language as both compiler and Interpreter for analyzing and execution of program no matter C++ too uses the same.

Java is a high-level powerful programming language, which provides user a powerful secure and safe software platform.
This is because due to feature of its translator that is JVM which where ever installed and on any platform understands the same byte code


In C++ due to absence of automatic garbage collection mechanism problems like memory leaks and much development time is been taken for coding., which is not seen in case user do java programming as java has its own automatic garbage collection mechanism.

Java is platform Independent whereas C++ is platform dependent.
To learn Beginner?s Java, Java Core and its sideways Editions Check at http://www.Roseindia.net/java


BaadshahKhan


April 28, 2012 at 10:36 AM


Please view this link for complete difference:









Related Pages:
Difference in XML, C, C++, Java
Difference in XML, C, C++, Java  hi... What is the difference between XML and C or C++ or Java ? please tell me about that Thanks
Difference between C++ and Java - Java Interview Questions
Difference between C++ and Java  Basic difference between C... was derived from C++ but still there is big difference between these two... am going to give you few differences between these two...1. Java does not support
Difference between C++ and Java
. Following are the difference between C++ and Java: Although both... Java and C++ are Object Oriented Programming (OOPs) language. Java... complex when compared to Java . C++ was designed for infrastructure
Difference between Java and C++
Difference between Java and C++ Java is an Object Oriented... Java Virtual Machine (JVM). Everything in java is treated as an object. C.... Differences are as follows: C++Java C++ is known as superset of C
difference between == and === operators?
difference between == and === operators?  Is (====) operator available in java or not? difference between
difference
difference    what is the difference between the JDBC-ODBC bridge, the Native-API-Partly-Java driver, and the JDBC-Net-All-Java Driver is the placement of the database access libraries   Please visit the following link
difference
difference  difference between Method Overloading and method Overriding   Difference between Method Overloading and Method Overriding... the following links: Java Method Overloading Java Method Overriding
difference
difference  difference between thread and process in java   Difference between Process and Thread: 1)Process is a program under execution whereas Thread is a part of program. 2)Process are heavy weight programs which
Difference between Timer and Thread?
Difference between Timer and Thread?  Can anyone tell me about the difference between Timer and Thread, Why we need to have Timer in case we have Thread implimentation startegy in Java
difference between lock and synchronization
difference between lock and synchronization  Hi, I am new in java please anyone tell me difference between lock and synchronization in java. its urgent. Thank in advance   Please visit the following link: Lock
difference between hashcode,reference in java
difference between hashcode,reference in java  difference between hashcode,reference in java
What is the difference between a break statement and a continue statement?
What is the difference between a break statement and a continue statement?   Hi, What is the difference between a break statement and a continue statement? Thanks,   Hello, In Java programming language supports 3
What is difference between the java and javascript?
What is difference between the java and javascript?  What is the difference beteen the java and javascript?   Hello Friend, Read Here Thanks
difference between applet and swings
difference between applet and swings  what are the major difference between swing and applets   Hello Friend, Differences: 1) AWT stands for Abstract windows toolkit whereas le Swing is also called as JFC?s (Java
Difference between error and exception ????????
Difference between error and exception ?  Can we handle a error in java if yes than give an code of an example? Difference between error and exception handling.......   Exceptions are things you can create/throw
What is the difference between a constructor and a method?
What is the difference between a constructor and a method?  Hi, What is the difference between a constructor and a method?   Hi, I have found a good link of Java program related to difference between constructor
difference between servletconfig and servletcontext in java
difference between servletconfig and servletcontext in java  difference between servletconfig and servletcontext in java   ServletContext ServletContext is implemented by the servlet container for all servlet
difference between wite and writeto in java
difference between wite and writeto in java  I am using the stream... the writeTo() method. I want to know difference between the write() and writeTo() method in java.   The writeTo() method writes the complete contents
What is difference between the java and javascript?
What is difference between the java and javascript?  What is the difference beteen the java and javascript?   Hello Friend, Difference: 1) Java is a Object Oriented programming language developed by Sun Microsystems
difference between servletconfig and servletcontext in java
difference between servletconfig and servletcontext in java  ServletConfig is implemented by the servlet container to initialize a single servlet using init(). ServletContext is implemented by the servlet container for all
difference between the obj and reference - Java Beginners
difference between the obj and reference  what is the difference between object and reference ? is there any difference
What is the difference between a JDK and a JVM?
What is the difference between a JDK and a JVM?  Hi, What is the difference between a JDK and a JVM? Thanks,   Hi, JDK is stand... to compile your source files using a JVM. For more difference between JDK and JVM
Difference between object and instance? - Java Beginners
Difference between object and instance?  What is the difference between object and instance in java
difference between enum and final class?
difference between enum and final class?  what is the difference between enum and final class in java?   The java.lang.Enum is an abstract class, it is the common base class of all Java language enumeration types
what is difference between objectan primitive? - Java Beginners
what is difference between objectan primitive?  whatis difference between object and primitive
difference between java5 and java6 - Java Beginners
difference between java5 and java6  Hi, What is difference between java5 and java6 Please let me know quickly
Give difference between LinkedList and ArrayList - Java Beginners
Give difference between LinkedList and ArrayList  Hi, What is the use of LinkedList and ArrayList? How you can difference between LinkedList.... For more information, visit the following links: http://www.roseindia.net/java
Difference between Java IO Class - Java Beginners
Difference between Java IO Class  What is the difference in function between Two set of Stream class as mention below- 1)FileInputStream... information. http://www.roseindia.net/java/ Thanks
Hi .Difference between two Dates - Java Beginners
Hi .Difference between two Dates  Hi Friend.... Thanks for ur Very good response.. Can u plz guide me the following Program.... difference between two dates.. I need to display the number of days by Each Month
Difference between API and Assembly - Java Beginners
Difference between API and Assembly  Can anybody tell me what is the diffrenece between API's and assemblies?  Hi friend, Points to be remember : API *) API Stands for "Application Program Interface
difference
difference  difference between hashtable and hashtree
difference
difference  what's the difference between mysql and sql
Difference between sorted and ordered collection in hibernate
Difference between sorted and ordered collection in hibernate  What is difference between sorted and ordered collection in hibernate?   ... the sorting features provided by the Java collections framework. The sorting occurs
what is the difference between access specifiers and access modifiers in java?
what is the difference between access specifiers and access modifiers in java?  what is the difference between access specifiers and access modifiers in java
pls tell me the difference between the run() and start() in threads in java....
pls tell me the difference between the run() and start() in threads in java....  difference between the run() and start() in threads in java
What is the difference between an if statement and a switch statement?
What is the difference between an if statement and a switch statement?   Hi, What is the difference between an if statement and a switch statement... in Java program. http://www.roseindia.net/java/java-tips/flow/switch/switch
Difference
Difference  What Is the difference between JDK & SDK
Difference between == and equals method in java
Description: For comparing equality of string ,We Use equals() Method. There are two ways of comparison in java. One is "==" operator and another "equals()" method .  "==" compares the reference
What is the difference between EJB 3.0 and JPA - Framework
What is the difference between EJB 3.0 and JPA   What is the difference between EJB 3.0 and JPA. How can they work together. Does EJB 3.0 need... which can be used for creating a mapping between plain java bean objects (POJO
difference
difference  difference b/w java and asp.net
Date Difference
Date Difference       This example learns how to make the difference between two dates and how... Object class and makes a difference between a Date object and a set of integer
Difference between DispatchAction and LookupDispatchAction
Difference between DispatchAction and LookupDispatchAction  What is the Difference between DispatchAction and LookupDispatchAction
difference between SessionState and ViewState
difference between SessionState and ViewState  What is the difference between SessionState and ViewState
difference between ForwardAction and IncludeAction
difference between ForwardAction and IncludeAction  What is the difference between ForwardAction and IncludeAction
Difference between struts and JSF
Difference between struts and JSF  What is the difference between struts and JSF
Diff b\w C++ & Java
Diff b\w C++ & Java  What is the difference between C++ & Java
what is the difference between jdk 1.4 and 1.5 and 1.6
what is the difference between jdk 1.4 and 1.5 and 1.6  what is the difference between jdk 1.4 and 1.5 and 1.6   Java 1.4 Features..., JSSE, JAAS) - Java web start Java 5.0 Features - Generics: provides compile
Difference between Normal Insert and BLOB insert
Difference between Normal Insert and BLOB insert  I have sql database...].[Image] ([Id],Images) SELECT 2, (select * FROM OPENROWSET(BULK 'C:\Users\Public.... So what is the difference?? and what changes i have to make in order to runn
Mysql Difference
Mysql Difference       Mysql Difference is used to return the records that are the outcome of difference between the records in a table. Understand with Example The Tutorial
Mysql Difference
Mysql Difference       Mysql Difference is used to return the records that are the outcome of difference between the records in a table. Understand with Example The Tutorial

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.