public static String removeLeadingZeroes(String value):
Given a valid, non-empty input, the method should return an input with all leading zeros. Thus, if the input is "0003605", the method should return "3605". As a special case, when the input contains only zeros (for example, "000" or "0000000"), the method should return "0"
public class NumberSystemService { public static String removeLeadingZeroes(String value) { while (value.indexOf("0")==0) value = value.substring(1); return value; }
I do not know how to write codes for the string "0000".
Dataj source share