Skip to content

Q 04 - Why is Java not a pure object oriented language? #7

Discussion options

You must be logged in to vote

❓ Why is Java Not a Pure Object-Oriented Language?

Java is often described as object-oriented, but it is not considered "purely" object-oriented. Here's why:


🧱 1. Primitive Data Types Are Not Objects

Java supports 8 primitive data types:

  • int
  • byte
  • short
  • long
  • float
  • double
  • char
  • boolean

These are not objects—they're handled by the JVM using direct memory access for performance reasons.

✅ Java introduced wrapper classes (e.g., Integer, Double, etc.), but using them still isn’t the same as enforcing object-orientation for all data.


🧙 2. Static Methods and Variables

  • Static members belong to the class, not to an instance.
  • They can be accessed without creating an object.
class MathUtils {
…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by AmjustGettingStarted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants