Well, I have a string in my Java code that needs to be converted into an integer with padding of 10. Ex. Consider this is the string... Str = "52112" I need to convert this string into an integer and the result should be like "0000052112". The result should be an integer. Can anyone help me with this, please?
As far as I know you cannot have an integer typed variable with leading zeros. You can pad the number with zeros but then it will become a String.
Take a look at:
In order to conform to the signature you have to convert the number to a string first, but that is no great deal.