• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Java and OOPs

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why Java is not fully object oriented language?
 
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

[ July 26, 2005: Message edited by: Mani Ram ]
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One reason is the primitive types, like int, double and so on.
 
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vallabhaneni Suresh Kumar:
Why Java is not fully object oriented language?



Show me a program without a single class in it first and then I will answer your question! What does a class encapsulate?! Think!!!
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vijayendra V Rao:
Show me a program without a single class in it first and then I will answer your question!



I can't. It's a syntactic requirement of Java (you can define interfaces & enums, but they don't count as a program, for they can't function independently).

Can you now answer to the question "Why Java is not fully object oriented language?"

Originally posted by Vijayendra V Rao:What does a class encapsulate?! Think!!!



It encapsulates state and behaviour. But, what effect does that has on whether Java is OO or not.
 
Vijayendra V Rao
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Clarice Doe:


It encapsulates state and behaviour. But, what effect does that has on whether Java is OO or not.



Good stuff! A class represents the state and behavior of "something". Now what is that "something"? When we design an application, we try to split up the problem domain into a conceptual set of objects and then we write classes that represent the state and behavior of these objects within the application scope. Even to start an application you will need an object, which would be the starting point. Even this is an object from where your application kicks off.

Thats the reason why I put it up in the form of a question itself. There is no way you can write a non-object-oriented program, atleast as far as I know, in Java. Ofcourse you can have an interface or an abstract class. But what is the purpose of it?! Where will you use it?! What does it represent?! It isn't even going to have a context in such a case.

I dunno how far I have been able to express myself. But if you still have questions then shoot back
 
Mani Ram
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vijayendra V Rao:

There is no way you can write a non-object-oriented program, atleast as far as I know, in Java.



Disagree. Remember that just using objects doesn't necessarily mean that it is OO.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vijayendra V Rao:


There is no way you can write a non-object-oriented program, atleast as far as I know, in Java



Its very easy to break OO principals with Java.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even in the most OO language, it would still be simple to write a fully procedural program, so that is hardly an argument.

For elaborate discussions on how Java is lacking in OO functionality, please do search this forum - it's a very frequently discussed topic.
 
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic