I want to generate a String with 11 digits from an ID.
For example:
an account with an ID=12 would give 00000000012
And after that I need to retrieve this id from the string.
For example:
a string with 00000000022 give an ID=22
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To format the string, use String.format:
To get the number back from string, use Integer.parseInt: