Forums Register Login

whether Java is 100% OOPS

+Pie Number of slices to send: Send
Hi all,

I want to know whether Java is 100% OOPS Language.
+Pie Number of slices to send: Send
Java supports OOP programming (inheritance, polymorphism etc.), but the code you write can be procedural or even functional in style. You can choose to use the OOP elements, or you can choose to ignore them.
+Pie Number of slices to send: Send
yes, Java was a big oops

Java has primitive data types and static methods and data members (which effectively make programming without OO principles possible), therefore isn't strictly OO (though one can always elect to not use any of those features of course).
+Pie Number of slices to send: Send
Check my signature.
+Pie Number of slices to send: Send
I don't think the phrase "100% object oriented [anything]" has any reasonable meaning.
+Pie Number of slices to send: Send
What is Hybrid OOPS and Pure OOPS? Give one example for each
+Pie Number of slices to send: Send
 

What is Hybrid OOPS and Pure OOPS? Give one example for each

Sounds like homework. Have you tried Google?

http://www.google.com/search?q=hybrid+object+oriented+programming+language

Hint: look at the first link.
+Pie Number of slices to send: Send
Is it fair to say that Java is not 100% OOPS because it doesn't support Multiple inheritance?
+Pie Number of slices to send: Send
Wow, that first link is a good page. Just skimming right now, but it looks very sensible. His rules for what is OO include my favorite: All operations send messages to objects. I'm sorry the Java community didn't pick up the "message passing" terminology to describe the language.
+Pie Number of slices to send: Send
 

Originally posted by Stan James:
Wow, that first link is a good page.



Agreed.

His rules for what is OO include my favorite: All operations send messages to objects.



My "rule" would be even more rigorous: control statements (such as "if" and "for") are implemented as messages to objects, too.
+Pie Number of slices to send: Send
 

Originally posted by Smita Chopra:
Is it fair to say that Java is not 100% OOPS because it doesn't support Multiple inheritance?



I don't think that really plays into the definition of a 'pure OO' language.

I would say Java is a hybrid language while smalltalk would be a 'pure OO' language if such a thing exists.

I would also point out that there is a difference between an OO language and OO code.
+Pie Number of slices to send: Send
it's kindof hard to completely ignore Java's OO features when you have to write all your code in classes, and explicitly type your "main" as "public static". ;-)

what exactly is "OO" will likely be debated forever. i like this summary of things people usually want in an "OO language", for a quick reference; note item 6, which has been brought up in this thread already. personally, i'm fond of items 5 and 3.

the language comparison that's been referred to here seems out of date. i know recent Python versions no longer use reference counting alone in their garbage collector, for example, and the column for Visual Basic is not talking about VB.NET, which is a quite different language from pre-dotnet versions. it's a good starting point, but i suspect no comparison of this sort can ever be kept very well up to date as there is simply too much change to track in too many different environments.

the worst flaw with that comparison seems to be that it apparently takes the Capers Jones language level study seriously. that latter study ranks "languages" such as HTML, Excel, shell scripts, and COBOL on a single linear scale... and ranks HTML higher than (for example) Lisp. i'm sorry, but anyone who thinks that is more than a bad joke frankly brings their own judgement into question.
+Pie Number of slices to send: Send
 

Originally posted by M Beck:
it's kindof hard to completely ignore Java's OO features when you have to write all your code in classes, and explicitly type your "main" as "public static". ;-)







(I've seen it done, it's scarry)
+Pie Number of slices to send: Send
To the original question ... if we said Smaltalk == 1.0 OO and Java = 0.873 OO what would we do with that information?

And a Huzzah to Steven for pointing out that we can talk separately about OO languages and OO coding. Java gives you the tools to do relatively good things, and the rope to hang yourself.
+Pie Number of slices to send: Send
And you can write OO code in C (without the ++), though it's very hard and error prone.
+Pie Number of slices to send: Send
When I was first getting some exposure to OOP in Byte and other magazines, IBM said they had done a complete redesign of CICS internals with an OO design and a 370 assembler and PLI implementation. I always liked that idea. It's all assembler at some point, isn't it? (Ok, I don't mean that too seriously.) Mostly they hid a lot of data structures that had been public behind new APIs. A good idea whether it was very OO or not.
Everybody's invited. Except this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 847 times.
Similar Threads
cross the river
why java does not have multiple inheritance?
Running Java Program
Java object based or object oriented
Synchronized methods
is java 100% object oriented
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:16:40.