Check out example codes for "how to reset a string in java". It will help you in understanding the concepts better.

Code Example 1

//Example string
String a = "Hello";

a = ""; //It's a simple way to reset/clear it, you can even put null instead of ""

Learn ReactJs, React Native from akashmittal.com