ideal
Welcome to the
Java Ranch, we hope you’ll enjoy visiting as a regular however,
your name is not in keeping with our
naming policy here at the ranch. Please re-register under an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!
As for your question:
The literal 255 is an int, in order to store it in a byte variable you have to cast it to a byte. But when you do that you'll lose some of the info because 255 is larger than a byte (-128 to 127).
As for your second question:
Input the ip how? From the command line as an argument to main? or as an input when prompted for it?
As far as storing and printing the ip - where do you want it stored (disc, text file, database, ...) and to what do you want it printed (printer, screen, dialogbox, ...). Do you have any code so far? post it so we can see where you're at. Sorry for so many questions but you need to give some more detail to get any meaningful help.
Also, this sounds like a school asignment so you might not get complete answers but little nudges in the right direction.
[ January 31, 2002: Message edited by: Dave Vick ]