aspose file tools*
The moose likes Beginning Java and the fly likes Byte Operation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Byte Operation" Watch "Byte Operation" New topic
Author

Byte Operation

Saravana Ranch
Greenhorn

Joined: Aug 03, 2005
Posts: 3
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.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

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.

Dave
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
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.

Layne


Java API Documentation
The Java Tutorial
Saravana Ranch
Greenhorn

Joined: Aug 03, 2005
Posts: 3
Originally posted by Layne Lund:


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.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9053
    
  12
Where is your code?


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Saravana Ranch
Greenhorn

Joined: Aug 03, 2005
Posts: 3
Originally posted by Marilyn de Queiroz:
Where is your code?


You have to say that!...
I am asking your idea.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Originally posted by Saravana Ranch:

You have to say that!...
I am asking your idea.


And we're asking you to show us what you have so far.


[Jess in Action][AskingGoodQuestions]
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Originally posted by Saravana Ranch:


You have to say that!...
I am asking your idea.


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.

Good luck and keep coding!

Layne
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9053
    
  12
Maybe something like this??

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Byte Operation