I got a integer string of size 10 (initialized with 0 )then I want to add a number with this string which is preceded with zero (0), using byte operation is it possible. Example : a[10] which is initialized with zero. I want to add 123 in this then result should be like this. 0000000123. ( Using byte operation. ).
Sounds like homework, in which case you'll need to show us what you have done first. We're happy to help, but we prefer to help people learn rather than hand out answers.
Either way, I'm moving this to the Java in General (beginner) forum.
Originally posted by Saravana Ranch: I got a integer string of size 10 (initialized with 0 )then I want to add a number with this string which is preceded with zero (0), using byte operation is it possible. Example : a[10] which is initialized with zero. I want to add 123 in this then result should be like this. 0000000123. ( Using byte operation. ).
The size of the array is the user's input.
What do you mean by "integer string"? This is not common terminology in Java. As noted above, you need to show us what you have tried already. We will be glad to help you from there. For future posts, you should also look at our suggestions about How to Ask a Question.
What do you mean by "integer string"? This is not common terminology in Java. As noted above, you need to show us what you have tried already. We will be glad to help you from there. For future posts, you should also look at our suggestions about How to Ask a Question.
Layne
----
An Array which hold integer value. The size of the array should be depends on user.
Please see the link that I gave above. In their own way, Marilyn and Ernest are asking for more information from you. Please show us what you have done so far. If you haven't written any code yet, that's fine. In fact, I strongly encourage you to use English (or your own native language) to explain the steps you will take to solve this problem. Tell us what your own ideas are and we'll be glad to help with any specific problems that you are stumped on.