Which of the following data types can store a null value in Java?

  • Integer
  • String
  • double
  • int
In Java, only reference data types (objects) can store a null value. Among the given options, String is a reference data type that can store null. The other options are primitive data types and cannot hold null values.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *