Hi,
I would like to send a datagram packet containing two parts of data totaling 40 bytes long.
There are two pieces of data that will be read from the command line.
The first is a name (30 bytes) and the second is a number (10 bytes).
I thought about:
and then concating the arrays but i wondered if there was a way to put both pieces of data in one array straight away.
Any ideas?
Thanks
I would like to send a datagram packet containing two parts of data totaling 40 bytes long.
There are two pieces of data that will be read from the command line.
The first is a name (30 bytes) and the second is a number (10 bytes).
I thought about:
Code:
byte [] name = args[0].getBytes();
byte [] number = args[1].getBytes();
and then concating the arrays but i wondered if there was a way to put both pieces of data in one array straight away.
Any ideas?
Thanks