Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Is java 100% Object Oriented Language ?

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,
I would like to know the concrete explanation for these two questions.
Is java 100% Platform independent language ? - No
Is java 100% Object Oriented Language ? - No
Thanks..............
 
author
Posts: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are truly looking for answers rather than arguments then,
  • check the web site http://java.sun.com
  • I consider a language as OO if it supports A.P.I.E. (see below)


  • Abstraction
  • Polymorphism
  • Inheritance
  • Encapsulation


  • "I made a mental note of that, but I lost my mind."
    [ October 24, 2003: Message edited by: Howard Kushner ]
     
    Ranch Hand
    Posts: 43
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    the explanation for your first question according to me is :
    The JVM is what makes java look like platform independent , so the
    JVM is different for different platforms.
    Secondly something like Garbage collection is highly platform dependent.
    even on the same platform you are not able to predict the time at
    which garbage collector runs.
     
    Arulkumar Gopalan
    Ranch Hand
    Posts: 104
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I am looking for a concrete answers..
     
    Ranch Hand
    Posts: 133
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    On my view there are two things that are not platform independent in Java
    1)Thread Scheduling
    2)Garbage Collections
    The Thread Scheduling is mapped to the native OS, and the other one alogorithm will be different in different platforms
    Regs
    Vivek Nidhi
    [ October 24, 2003: Message edited by: Vivek Nidhi ]
    [ October 24, 2003: Message edited by: Vivek Nidhi ]
     
    Ranch Hand
    Posts: 1865
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Java has primitive values that are not objects; so one could argue that Java is not 100% object oriented. The Smalltalk programming language has no primitive values; so one could argue that it is 100% object oriented.
    I don't believe the above arguments are important.
     
    Ranch Hand
    Posts: 3271
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    As Dan pointed out, Java is NOT fully object oriented. In order for Java to be 100% OO, primitives would also need to be objects, which they are not.
    Also, the Java programming language appears to be platform-independent, but that is only due to the underlying JVM. That layer effectively isolates any Java application from the underlying OS. When an API call must be made, the JVM handles it. As the JVM is directly interfacing with the underlying OS, the JVM must be tailored to the OS. Hence, we have various JVM's for various OS's. Depending upon whether or not you wish to include the JVM as "Java" or if you with "Java" to refer sepcifically to the programming language itself, you could argue that Java is or is not platform independent. For that question, it's pretty close to impossible to state that Java is or is not platform independent.
    However, this material is NOT covered on the exam and I am moving this thread to Java in General (Intermediate). If you'd like to continue this conversation, please do so in that forum.
     
    author
    Posts: 14112
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    You should also do a search at the saloon for these topics, as they are *very* frequently asked.
     
    Ranch Hand
    Posts: 37
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Interesting stuff, although perhaps only from an academic point of view. Given the arguments, does this mean there is no such thing as a platform independent language?
     
    lowercase baba
    Posts: 13003
    66
    Chrome Java Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Isn't this debate kind of meaningless unless everyone can agree on EXACTLY what "platform independant language" and "object oriented" mean? Without defining the terms first, all else else is irrelavent.
    according to one of my books, one of the basic tenats is that to be a pure OO language, "everything must be an object". well, java clearly fails that with the primitive types.
    what does "platform independant" mean? usually, i've heard it defined as "write/compile once, run anywhere". Java (from a programmers perspective) does satisfy this. but somebody had to write all the JVMs, which clearly are NOT independant.
    I guess my main point is that you can't ask for concrete answers without giving concrete definitions of your terms...
     
    mister krabs
    Posts: 13974
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Platform independent?
    I code and unit test on Windows 2000, then move to HP-UNIX for integration and acceptance testing, and then to Sun Solaris for production. I don't have to change a single line of code. That is platform independent in my book.
     
    You showed up just in time for the waffles! And this tiny ad:
    Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    reply
      Bookmark Topic Watch Topic
    • New Topic