What do I first learn Java or C ++?

Closed due to the fact that off-topic participants Saidolim , ThisMan , Nick Volynkin , tutankhamun , RussCoder Oct 11 '15 at 10:26 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • " Questionnaires are forbidden on Stack Overflow in Russian . To get an answer, rephrase your question so that it can be given an unambiguously correct answer." - Saidolim, tutankhamun, RussCoder
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • 6
    Python. - KoVadim
  • five
    Personally, I would advise the newcomer to first of all study C - simple language, but it gives a general understanding of the processes occurring at a low level. And then go to the high-level languages, there is not much difference C ++, Java or C # - dzhioev
  • one
    IMHO it's easier to start with java, having mastered the basics of OOP, you will understand how not to write bad code in a procedural language (the initial level C is exactly that). Studying C, you will learn not to abuse OOP in Java. - jmu
  • 3
    It is also very important to know English. Very useful. - Viacheslav
  • one
    > having mastered the basics of OOP, you will understand how it is not necessary to write a govnokod in a procedural language I do not agree. First you need to understand the algorithmization. A tinsel like OOP bothers it. And then you can switch to the OOP paradigm. In this case, the task decomposition skill obtained at the procedural level is very useful. And even better - to master the functional programming. It sets brains very well in place and allows you to understand how to build large systems with parallelization (for example, knowing the side effects of executing code!) - gecube

6 answers 6

It all depends on what program you want to write. If this is an online application - almost uniquely Java. If high-performance client or drivers - C ++. Every language is good for a specific task. At the same time, I personally add that as a learning language, Java is better, since it has more strict typing and allows you not to stuff your head with system things at the initial stage. But, at the same time, it’s the same in it and it’s bad - if later life collides with C ++, it will be extremely difficult to get used to all this.

  • the main thing is not to start with php and python (it’s better to learn IMHO after c ++ and java), otherwise it’s going to be difficult later - G71
  • Drivers in C ++? Bust it. Drivers are written almost on bare C. Highly effective C ++ code? I agree, but it is difficult. It is better to study which thread is a functional language or the same python. - gecube

With knowledge of C, you can not even choose which one to learn first.
But if there is no knowledge of C, it is better, in my opinion, C ++, because without knowledge of pointers (without understanding how it all works) it is quite difficult to write fast programs in both languages.

  • 2
    Pointers should be known at least in order to be aware of the danger of using them and try to avoid them (they are not in java, in C ++ they often recommend sticking with RAII). "Premature optimization is the root of all ills." - AlexeyM
  • one
    Pointers should know at least in order to realize how everything is actually arranged. - avp
  • one
    russian.joelonsoftware.com/Articles/BacktoBasics.html . Yes, and RAII not apply everywhere. - Ilmirus
  • About that and speech. The same strcat() would be much simpler if proper strings were used (for example, containing a length, like .net-s, or BSTR). - AlexeyM

If you plan to learn both languages, then it is better to first learn C ++, since after it Java is much easier to understand, unlike the opposite situation.

  • one
    But after a good level in c ++, for some reason it turns up from java, :) then GC is naughty and customizable, then there is no typedef. - KoVadim pm

It depends on what you want.

Java is just a stub of C ++. After learning C ++ you have to read a little about Java and you can write in both languages ​​calmly.

If you want to write cross-platform applications right away and do not intend to learn other languages, take a look at Java.

I would recommend starting with C ++.

  • one
    "Java is just a stub of C ++." - ??? I can not think of, for what it is possible so to call Java. Java is not a subset of C ++. What is chopped off? You can also write cross-platform applications in C ++. Did you mean "once compiled - run where you want." - yapycoder
  • I meant Java was created after C ++ and is its descendant. There are things that can be done in C ++ but not in Java. That is why Java is just a stump. This does not mean that it is worse than something (like language). - Sergey
  • However, there are tasks that are difficult to solve in C ++, but easy in Java, for example, the serialization of the object graph. - AlexeyM

I started with C ++ - I'm happy with it. Much depends on the textbook. Both languages ​​are functional, but in Java mostly OOP, whereas in C ++ you can write equally well in OOP and procedurally (imkho).
I tried to understand web programming first, but did not find a good tutorial, but found it in C ++.

    It all depends on what area you want to work in. What is more interesting to you. From this we must dance further. Read and ask questions in the internet, where what language is used, although it can be found out without asking questions, and understand what is closer to you, what is more interesting for you. The main thing to understand is that C ++ and Java are not the same thing, and there is a difference, and not least, what to learn.