1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

what is the difference between c++ and java?

Discussion in 'C++' started by nisha134, Oct 13, 2011.

  1. nisha134

    nisha134 Banned

    Joined:
    Sep 7, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    reply me...thanks in advance..
     
  2. neeraj_77

    neeraj_77 New Member

    Joined:
    Aug 30, 2011
    Messages:
    36
    Likes Received:
    2
    Trophy Points:
    0
    Location:
    India
    Home Page:
    Within a software engineering point of view, Java seems to be the more robust programming language among Java/C++. The language catches some of the ugly design and implementation features that C++ offers. The memory management based on garbage collection makes code more robust and might allow faster development. Concerning highly optimized code, C++ may be the choice.
     
  3. raixyz

    raixyz Banned

    Joined:
    Oct 18, 2011
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    The main difference between c++ and java is that 'C++ does
    not allow persistence because it does not support database
    connection while Java allows persistence because it
    supports database connection'.
     
  4. archanababu

    archanababu Banned

    Joined:
    Oct 27, 2011
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    0
    Java written in class modules but c++ is an Object Oriented Programming
     
  5. Trinity

    Trinity New Member

    Joined:
    Nov 23, 2011
    Messages:
    28
    Likes Received:
    11
    Trophy Points:
    0
    Occupation:
    Software Engineer
    Major Broad differences between Java and C++ are:

    1. Portability - C++ sources are required to be compiled for a particular system, to execute on that system only, whereas Java compiles to a byte code which just needs a JVM (Java virtual machine), and hence, can run the byte code compiled for any platform.

    2. Memory management - C++ programing expects programmers to manage the memory allocated on heap using new and delete(), whereas Java handles the memory cleanup itself internally. Java programmer does not need to worry about freeing up any memory allocated.

    3. Organization - C++ generally have individual classes which can be included in namespaces in case of same class names, however Java classes work in packages i.e. each Java class must be a part of a package and each class is identified by its package. i.e. absolute class name would include the package name.

    4. UI - In general Java is considered better and efficient for UI handling.

    There might be many other differences, but above mentioned are the major ones as far as I've come across.
     
  6. jhonden

    jhonden New Member

    Joined:
    Sep 13, 2011
    Messages:
    190
    Likes Received:
    4
    Trophy Points:
    0
    Java is platform independent language and C++ is not moreover Java does not support type definition or pre processor. Java supports classes which PHP doesn't.
     

Share This Page