There are multiple ways to do that:
A = [];
Using this command, you can able to do that, but for the reference variable, it will not work.
You can also use these commands as per your requirements:
A.length = 0
A.splice(0,A.length)
I hope this will help.
Want to become a Java expert? join Java Certification now!!
Want to know more about Java? Watch this video on Java Tutorial for Beginners | Java Tutorial: