Difference between null and empty (“”) Java String

前端 未结 22 1498
再見小時候
再見小時候 2020-11-22 17:10

What is the difference between null and the \"\" (empty string)?

I have written some simple code:

String a = \"\";
String b         


        
22条回答
  •  心在旅途
    2020-11-22 17:36

    enter image description here

    This image might help you to understand the differences.

    The image was collected from ProgrammerHumor

提交回复
热议问题