0
program in array to remove zeroes from a digit
ex.5400207 o/p::: 5427
2 Answers
+ 3
1. Convert integer to string using method String.valueOf( int) which will return a string value
2. Implement method replaceAll(â0â,ââ) which means replace all zeros with empty string
3. Now parse string value to integer using method Integer.parseInt(string) which will return a integer value
Basically you are just using a replaceAll(â0â,ââ) to find the 0's and replace them with nothing. You just need to put this out as a string first.