What is the default value of a String reference in Java?

  1. Empty string
  2. null
  3. 0
  4. "null"
Correct answer null

Explanation

The default value of a String reference (not initialized) is null.

Update: Admin added a tag on this question

Topics

By Admin · · 41 views