Programming Questions

  • Newest
  • Popular Tags
  • Ask A Question
  • Which one should I learn next? Java, C or C++
    Hi Guys, I am a python programmer, and I want to learn to program in one other compiled language. But I am having difficulty choosing between C, C++ and Java. Could you please help me make a good decision?
    kofiamoah435 posted this question on 5/28/14 | java, cpp, language
    Answers
  • +
  • 4
  • -
  • It depends on what area you want to program in after you learn the language. If you want to eventually learn all three languages, then C is a good language to start with, since the other two languages are based on it; additionally, C is good to know if you want to program operating systems or embedded applications. If you eventually want to learn object oriented programming, program mobile apps or games, start with Java. If you want to program advanced systems applications or video games, go with C++.
  • +
  • 3
  • -
  • I suggest go in this order.. 1.C 2.C++ 3.Java And I think once you know C then C++ is very easy, once you know C++ then Java is very eas.
  • +
  • 2
  • -
  • I think for someone who is not new to programming, but already knows one high level language, the proposed order (c, c++, java) may not necessarily be optimal. Depending on the level you want to reach, I would say (java, c, c++) or (java, c++, c). Java is somewhat similar to python in terms of memory management, since both do it implicitly, but since MM is implementation-dependent for python a comparison on the language-level is difficult imo. Java uses garbage collection. Very likely the most noteable difference is that Java is statically typed, i.e. you would write
    int a = 0;
    instead of
    a = 0;
    C is a low level language and its style will probably be unfamiliar for someone coming from python. There are no actual classes, no inheritance and a very simplistic standard library. This is not a bad thing, this is how c works. The most notable difference to Java (apart from not being OO) will be the way c manages memory - it lets you do it. You are able to create objects on the heap manually and you and only you will be in charge of releasing the assigned memory again. If you fail to do so, you "leak" memory. Furthermore you can directly store a reference to a memory address in a variable - a pointer. Passing around pointers is very common in c to efficiently pass variables to a function. I could rant on for a while, but I ll leave it with that. C++ used to be c with classes, but is now probably the most complex language out there in terms of the features it offers. The c++ paradigm is kinda "if we can implement it efficiently, we will offer it". Therefore you have generic funcitons and objects (templates), different kinds of single inheritance and multiple inheritance. You are also able to do manual allocation of memory, although that is frowned upon in c++. You would want to use either RAII (constructor/destructor handle alloc/free of resources) or one of the new pointers from c++11, out of which one supports reference counting and automatic deletion onces the count reaches 0. Doing simple tasks in c++ will be fairly easy, but if you start using its advanced features, you will have to learn A LOT about the language. You should get the book from Stroustrup. You should be able to write code really quickly in either one of the three languages, but I think learning to read/write java is the easiest. C can be hard to read/write properly, because its area of application is typically close to HW, which means you will not have abstractions you may be used to. Both c and java introduce some features you will recognize in c++, but ultimately learning how to properly code c++ is probably the most difficult. This has been discussed in other places: stackoverflow.com/questions/1085134/why-is-c-relatively-harder-to-use-bad-choice-for-a-beginner Personal note: I love c++. It is complex as hell, but some of the shit you can do is just so cool.
  • +
  • 1
  • -
  • C++ :)
  • +
  • 1
  • -
  • java
  • +
  • 1
  • -
  • C is the base language, so you could lean C first, however Java is the most popular language out there so you could easily find better help
  • +
  • 1
  • -
  • it depends on where you want to go with your skills, I think Java is far more popular in terms of getting a job on the field, but that does not mean it is more powerful than C. As far as my experience goes, I started programming in Java about 7 years ago, and recently started coding on C++ and C(about a year ago), and I found it relatively easy from my transition. If you understand Java, you will get C and C++ easily, plus there are many languages similar to Java out there so there is a lot of potential there
  • +
  • 1
  • -
  • Thank you all so much...and the stackoverflow link helped #mike0809
  • +
  • 1
  • -
  • Thanks Dave
  • +
  • 1
  • -
  • java and c, c++ are like totally different animals with small variations honestly it depends on your coding experience if you are experienced java if you are not c, c++. hope this helps have a beautiful day :)
  • +
  • 0
  • -
  • +
  • 0
  • -
  • You need to learn the Java language. Due to platform independent, Java is so popular programing language. You can follow emailsupports.net/rocketmail-login-support/ to learn Java. C++ is very similar to java. It's not platform independent.
  • +
  • 0
  • -
  • Hi! I started with Java. And then I learned C++. Well, now I'm programming on C#. C# is really good and simple language. It's a mixture of Java and C++ with .NET So I think you should start with Java and then if you don't want to learn C++ start learn C# Good luck!
  • +
  • 0
  • -
  • I hope that helps
  • +
  • 0
  • -
  • C++ because it is OOP and works on all platforms and operating systems. (Java is better but needs runtime)
    Log in to write an answer.