0

c++ and java

which is best for object oriented programming and why?

9th Jun 2019, 12:35 PM
Simon Okwir Lungole
Simon Okwir Lungole - avatar
3 Answers
+ 4
I would say java because it's more OOPS than c++
9th Jun 2019, 11:08 PM
minirkk
minirkk - avatar
0
i am looking for very genuine answers please
9th Jun 2019, 12:36 PM
Simon Okwir Lungole
Simon Okwir Lungole - avatar
0
There is no best Object Oriented Programming language. They both have their pros and cons. Just to cite a few: Pros: C++ memory management will allow to create classes that efficiently manage the opening/closing ressources Java by making almost everything a Reference Object makes it easier to use runtime polymorphism (you don't have to care about pointers, virtual methods, etc) C++ is generally faster Java is generally safer Cons: C++ is a vast language (especially with c+11/14/17/20 new features) and requires you to learn the language properly to be able to write code confidently Java is really verbose C++ build systems can get really complicated pretty fast Java programming language constraints can sometimes be annoying (the first example that comes to mind is the only one class per file) So pick the one that fits the best you project
9th Jun 2019, 2:09 PM
Paul