In C++ main oop's concept is Mulitple inheritance. since java doesn't support multiple inheritance.what i am thinking java is not a 100% oop's language.any way i know through interface you can implement more than one interface. what is the use of interface,only we can have method declaration( ie. abstract method) inside the interface.i am very much confussing about oop's.clarify my doubt. ------------------
Multiple inheritance is a snare and a delusion. Java's extensive use of interfaces is greatly to be preferred. Study the use of interfaces in the standard library packages to see how elegant it can be. WBB
Ah well....my 0.02INR ! It's very easy to teach & preach OOAD but to practice....hmm. IMO, the very fact that one thinks about Multiple Inheritance - is making a mistake in OO thinking. CLEAN OO thinking is very hard to come by. Human mind is so powerful, it always finds the shortest path to the goal-- which, in-fact may not be the REAL OO thinking, but then again....it's a paradox! My point is- JAVA supports ALL the OO concepts that ONE would like to implement. Unless there are clean 'contracts' through Interfaces, you are NOT implementing 100% OOD. I like this debate. any comments Tony? regards --Shiny
hi, i too am of the opinion that java may not be 100% OOP. My contention is with the "static main()" method and the primitive data types...but more than primitive data types, a single static main method being the point of entry and controlling the whole program makes me uncomfortable when i have to accept the java is 100% OOP...
Java interface is a very smart concept to avoid conflicts when using multiple inheritance, what is not necessary in an OOL. Smalltalk does not have multiple inheritance too as I know, even if it has it today, it is crearly not necessary. What meke some Java code not OO is static method bad useness. Many C programmers like to use static methods as they were functions in C language. IMO, static methods would just be used as class methods like those in Math class. To encapsulate code, we need think about polimorphism.