Dsandre Dsandre - 1 year ago 96
Java Question

Android - Clean char array quickly and effectively

Is it possible to clean a char array in Java (Android) quickly and effectively? Make an other loop on the treatment seem to be to much heavy to be an optimised solution, doesn't it ?

It's strange but it is impossible to find such a solution in Java on the internet without having to subscribe to a pay site ..

Thank's to your attention

Answer Source

Why do you need to clear a char array in the first place?

Most functions that want a char array to put some data in it (IO read, etc..) return the length of data that was put in, so you can disregard the rest of the data in char array.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download