How to represent empty char in Java Character class

后端 未结 16 876
遥遥无期
遥遥无期 2020-11-29 02:11

I want to represent an empty character in Java as \"\" in String...

Like that char ch = an empty character;

Actually I want to rep

16条回答
  •  离开以前
    2020-11-29 02:35

    You may assign '\u0000' (or 0). For this purpose, use Character.MIN_VALUE.

    Character ch = Character.MIN_VALUE;
    

提交回复
热议问题