Skip to content

Java

Primitive Data Types

In Java, the phrase "everything is an object" is often used to emphasize that Java is an object-oriented programming language. However, there are important exceptions to this rule. Here are the exceptions and explanations:

Exceptions to "Everything is an Object"

Primitive Data Types:
Java has eight primitive data types that are not objects. They are:

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

These types are simple values and do not inherit from java.lang.Object.