1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

C++ vs. Java

Discussion in 'Programming' started by mark123456, Sep 9, 2007.

  1. #1
    Which is the better language to learn, and which is more powerful? My class is doing some gay KPL language so I've decided to learn one of the two on the side, hoping you guys can recommend which one is better. The only experience I have is with Flash ActionScript.
     
    mark123456, Sep 9, 2007 IP
  2. Codythebest

    Codythebest Notable Member

    Messages:
    5,764
    Likes Received:
    253
    Best Answers:
    0
    Trophy Points:
    275
    #2
    Java because it is powerful, multi-platform and internet friendly...
     
    Codythebest, Sep 9, 2007 IP
  3. twalters84

    twalters84 Peon

    Messages:
    514
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well, it really depends what you are looking for your application to do.

    You can really get low-level with C++. I have done a lot of socket programming for some MUD I made a few years back.

    You can build applications with Java a lot faster because most of the code is already written for you. It is just a matter of finding which library and function you need.

    You can think of Java as C++ on steroids.
     
    twalters84, Sep 9, 2007 IP
  4. farjam

    farjam Peon

    Messages:
    368
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I think it depends on use.

    you can use both of them in variety of applications.

    but in low-level applications C++ is more powerful than java.

    they are very similar in coding.

    the output of C++ is .exe and it is executable on almost every computer but

    output of java is .class and every computer which wants to execute it must

    have Java Virtual Machine.

    this Virtual Machine makes every computer execute .class file in the same

    way which programer wants but .exe file may be executed differently in every

    computer depends on its hardware.
     
    farjam, Sep 10, 2007 IP
  5. mark123456

    mark123456 Peon

    Messages:
    786
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    okay, but i heard that to learn java is to learn 90% of C++ and vice versa. are the differences that you mentioned the only ones??
     
    mark123456, Sep 10, 2007 IP
  6. farjam

    farjam Peon

    Messages:
    368
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #6
    you `re right but only in form of coding.

    for example see below:

    if ( x>= 0) {

    // code here

    }

    the code above are same in both programming language.

    but usage is different.

    Java is more object oriented than C++.

    in network programming , experts mostly use J2EE ( java programming for network)

    and you can use J2ME ( java for micro devices like mobile phones).

    but C++ has more popularity and is used for simple programming.

    but it doesn`t mean that you can`t use C++ to write complex programs It

    means that it is more difficult to use C++ in complexity because C++ is low

    level programming language.
    :)
     
    farjam, Sep 10, 2007 IP
  7. akula

    akula Peon

    Messages:
    689
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #7
    If you are going to be learning it in your spare time then I would say go with Java which i think is an easier language to learn. If you then want to learn C++ it will not be that big of a jump.

    Also Java has what can only be described as the greatest learning aide in the business. "Head First Into Java" may be the greatest programming book ever written. Buying this gem should be your first step into learning Java!
     
    akula, Sep 10, 2007 IP
  8. comboy

    comboy Well-Known Member

    Messages:
    328
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #8
    C++ for the system application software, for high speed, real time software...
    Java for network application, database, and run in multiple platform.
     
    comboy, Sep 11, 2007 IP
  9. firmaterra

    firmaterra Peon

    Messages:
    756
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I'd go with java. A lot of the concepts will be easily transportable to C++ but for learning on the side I think java would probably be easier.
     
    firmaterra, Sep 12, 2007 IP
  10. Malthus

    Malthus Peon

    Messages:
    28
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Either will do well by you if you want a future in programming, but Java is easier to learn on your own. I'd also reccomend "Agile Java: Crafting Code with Test-Driven Development" as a solid book to learn from.
     
    Malthus, Sep 12, 2007 IP
  11. mark123456

    mark123456 Peon

    Messages:
    786
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #11
    can java accomplish most of the same tasks that C++ does or are their usages completely different..and can java be compiled to .exe form or are the final programs always .class?
     
    mark123456, Sep 12, 2007 IP
  12. amf-flt

    amf-flt Active Member

    Messages:
    100
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #12
    No, java cannot accomplish everything C++ can. On the other hand, C++ leaves a lot of resource maintenance stuff for you to handle that java takes care of for you.

    Why not learn both? Why limit yourself to only one knife in the kitchen, one golf club in your bag, ....?
     
    amf-flt, Sep 12, 2007 IP
  13. mark123456

    mark123456 Peon

    Messages:
    786
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #13
    i think i might do that..most of the syntax is the same right?
     
    mark123456, Sep 14, 2007 IP
  14. basdotnet

    basdotnet Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    I think Java is better.
     
    basdotnet, Sep 14, 2007 IP
  15. mark123456

    mark123456 Peon

    Messages:
    786
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #15
    which language is more popular right now, and which one are north american universities focusing more on at the moment?
     
    mark123456, Sep 15, 2007 IP
  16. amf-flt

    amf-flt Active Member

    Messages:
    100
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #16
    C++ is waning in favor of C#. Forget what universities are focused on; they'll teach you what they want you to know anyway. If it's all about universities, focus instead on learning how to program, not the language you program in.

    To answer your earlier question: The syntax is not quite the same. Java is more readable to the untrained eye and is closer to C# than anything.
     
    amf-flt, Sep 15, 2007 IP
  17. worldman

    worldman Notable Member

    Messages:
    3,337
    Likes Received:
    261
    Best Answers:
    0
    Trophy Points:
    225
    #17
    What is the difference between C# and C++?
     
    worldman, Sep 17, 2007 IP
  18. mark123456

    mark123456 Peon

    Messages:
    786
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #18
    i know c# is microsoft and for asp.net...ive heard the syntax of c# is easier to understand too
     
    mark123456, Sep 17, 2007 IP
  19. mirata

    mirata Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    I think both of them have own usage:p
     
    mirata, Sep 18, 2007 IP
  20. mark123456

    mark123456 Peon

    Messages:
    786
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #20
    i decided to try to learn both...does anyone know of any good books geared to people with not a ton of programming experience??
     
    mark123456, Sep 19, 2007 IP