I am cs student , I am currently in 2nd year . I learned java langauge . so I think java is also good for competative programming but I think c++ is good so should I learn cpp or continue with java and one more think I also started to learn android studio so what I do ??
Hey, there are many great competitive programmers who still write their in JAVA for CP contests so It is wrong to say that it is not possible to become good using JAVA. But I would like to point some of the advantages that C++ has over JAVA specially in CP contests which makes it worth shifting to C++ specially in the beginning phase as it won’t take much time to get comfortable with C++ as you already know JAVA.
- Most of the editorial and guides you find online have their code written in C++
- There are times when some online judge have a very tight time limit and the algorithms which when written in C++ gives an AC tend to fail in other languages.
- The community support for C++ is very strong in C++, it is very easy to approach someone for help.
Ultimately it depends on your goal. If your aim is to become an android developer and you are doing CP in order to strengthen your logic for Android Dev only, then you should definitely keep using JAVA, but if you plan to do hardcore CP or you want to prepare for placements then C++ definitely has a slight advantage.