Solve either one the below coding question
you have to move zeros either to end of the array or bring them to beginning of the array. For example, if {14, 0, 5, 2, 0, 3, 0} is the given array, then moving zeros to end of the array will result {14, 5, 2, 3, 0, 0, 0} and bringing zeros to front will result {0, 0, 0, 14, 5, 2, 3}. Solve without using For loop and without using a new blank array/collection.
Write a Java program to replace all leading and trailing zeroes in a number without using Replace function. Eg. input - 0001120380.0000 output - 1120380, input - 00012.001200 output - 12.0012