Results 1 to 7 of 7

Thread: is java 100%

  1. #1
    MarkWilson is offline Member
    Join Date
    Jun 2008
    Location
    us
    Posts
    47
    Rep Power
    0

    Default is java 100%

    see dear friends ,

    actually java is not 100%pure oo language because of Primitive data types

    and we can use the Wrapper class in java to use Primitive data types

    so as compare with the C++ how u can say that " C++ is object oriented pure and Java is not "

    please maintain some example so ican clear my dought?

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    They both have primitives so neither are 100% "pure" OO, and that straight C code can be compiled within C++ (at least under certain circumstances) is a pretty good indicator that Java is more and not less OO than C++.

    But, as already said, it is a silly question as there is no established "purity" standard anyway.

  3. #3
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Location
    Southwest
    Posts
    1,018
    Rep Power
    8

    Default Pure is unachievable

    Big discussions ensue on this issue, sometimes resulting in useful work but to say that Java, or any other language for discussion, is or is not Pure OO is somewhat perplexing to me: What about the actual code that drives the computing engine? If a design tool achieves effectiveness in coding, that is because the coder has given thought to the problem domain and how to go about getting useful results in the area. OO does not write code, you do. The idea of encapsulation and so on have proven their value to me in examining code designs, after I have gotten someting to work.

    For me, the problem naturally makes it's own solution available. Then later I get somewhat stuck and consider the design ideas presented by OO but not before putting some code up. We may put up stubbs as a notational matter, but even on back of envelope brainstorming I tend to write raw code directly. There may be effective discussions on what is Pure OO and adherents may cite those, but there are no absolutes.
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Yep, it's a pretty irrelevant statement by the OP. Who cares as long as it works?

  5. #5
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    7

    Default

    IMHO, "pure OO" is a religious discussion, and I'm an engineer, not a theologian.

    Smalltalk is a pure OO language. Java has roots in C, which were needed to encourage C programmers to even consider it.

    At times, I wish we could get rid of them, things like 'int', 'float' and the baggage they need. But then it would not be Java.

    I expect that something like Java, probably using the JVM, will come along and be more OO, or not have the crutches of C. Perhaps scala will take off. Perhaps something else.

    But in the meantime, I write code.

  6. #6
    Ciwan is offline Banned
    Join Date
    Dec 2008
    Location
    Earth
    Posts
    87
    Rep Power
    0

    Default

    hmm interesting ..

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Java is not pure OO language.

    One reason is that calculation of primitive data types on the platforms such as byte, int, long, etc... and the space it tales on the native operating system would be different.

    One of my lectures explain it in this way.

    There are six qualities to be satisfied for any programming language to become an Object Oriented.

    1. Encapsulation
    2. Inheritance
    3. Polymorphism
    4. All predefined types are objects
    5. All operations are performed by invoke with objects
    6. All user defined types are objects.
    So in simple words, Java primitives are not Object. But some of the above qualities satisfied. So Java is not 100% OO language.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •