Thread: Java and C++ are alike ?

  1. #16
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Java has the portability of any other interpreted language (even though the Java itself isn't interpreted, the bytecode is). It'll work uniformly on any system for which a properly implemented virtual machine (which of course is written in a compiled language) without having to be recompiled.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  2. #17
    GuiltySpark343
    Guest

    portability

    "...That's the point. Joe Average doesn't know how to compile a relatively portable C++ application, but he'll have no problem going to www.dancing-baby-and-other-wastes-of-time.org to run a Java applet. "
    True, but only if somebody has already ported the "virtual machine" to the processor in question.

    Java is JAFL.

    Remain here, Reclaimer. I must activate Security Protocol 2401 from a remote terminal. I will route Sentinels to your location to compliment your Class 2 armor until I return. The Flood is virulent, and must not be allowed to leave this installation.

  3. #18
    Registered User
    Join Date
    Dec 2001
    Posts
    70
    Java is nothing compared to C++ speed, but take its simplicity and similarity to C++ and you would have the best educational programming language.

    Just few days ago I was able to semi-complete nice Tetris game in Java (J2SE/AWT), all within one month and without any previous knowledge of this language. As I am occasionally stupid and lazy, this proved me that Java is not so bad.

    As for other languages, all depends on what you try to gain with your particular language. For those "object oriented" with possible further step to C++ and some MFC/Windows programming, it is simply not bad, you won't loose.

  4. #19
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    Ahh.....something I FINALLY know about. First of all, Java is no better, or worse, than C, C++, or C#. But there are some big differences between the languages. The basics:

    Java does not have(that C/C++ does):

    • Pointers
    • Templates
    • Structures or enumerations
    • Multiple inheritance


    Java does have (that C/C++ doesn't):

    • Interfaces
    • Ability to compile into applets
    • Great Portability
    • Great Secuirty


    The list could go on, but that's all I care to think about now !

    Anyway, Java is compiled not into machine code, but bytecode. This bytecode is in turn interpreted by a Java interpreter. The interpreter ensures better security and portability (unfortunately, not speed). If compiled into an Applet, it can be run by a Java compatable web browser to have complete programs or games playable via internet. You may have seen Java chat rooms on the internet......another wonder performed by applets ! OK, I'll quietly crawl away and hide now........
    Do not make direct eye contact with me.

  5. #20
    booyakasha
    Join Date
    Nov 2002
    Posts
    208
    I use java more often then C++.
    I like it's style and it's libraries, and I don't have to recompile to move from my XP to Linux boxes or to use on Unix at my school.

  6. #21
    CS Author and Instructor
    Join Date
    Sep 2002
    Posts
    511
    Java does not have(that C/C++ does):




    Pointers

    Templates

    Structures or enumerations

    Multiple inheritance


    Well in the newest version of Java to be out later this year- java will have enumerated types. Interfaces can simulate multiple inheritance
    Mr. C: Author and Instructor

Popular pages Recent additions subscribe to a feed