+ 2
Why does Java not support multiple inheritance, operator overloading & pointers ?
C++ supports all these stuff. but java doesn't. Can anyone explain me why ?
2 Answers
+ 8
Java is a general-purpose programming language that is concurrent,based on object-oriented concept which is specifically designed in a such way that, it provided more controllable development to the programmers.
It is true that apart from different languages like C++, Java does not support those features directly...
but it provided those functionality in different form...
as for multiple-inheritance
it is true that, we can not use multiple inheritance with the classes but we can do this with interface which supports it, an also provide more control over classes with some more additional option during development along with it on Java we can also perform multi-level inheritance.
for operator overloading
We can not overload the operators in Java but for othis Java give us polymorphism mechanism with overriding and overloading of the methods, variable, constructor etc with their own set of rules during development.
for pointers
we have the reference variable as to give quick access to the value and if you are working on collection then it also give you Iterator that points to the elements which are available on the set and provide build-in functions to manulpulate the output data.
0
Because Java can't C(see) đ