0
c++ and java
which is best for object oriented programming and why?
3 odpowiedzi
+ 4
I would say java because it's more OOPS than c++
0
i am looking for very genuine answers please
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