-5

I am receiving two strings in one second from a remote device via bluetooth. (1st string then after some millisecond the 2nd string). for example:

string 1: 56ab5620a12031456764610000000000 

and

string 2: 56ab563012800.

How and where should I store my first string, wait for next string and then combine these two like head+block? any suggestion please.

Nathan Hughes
  • 94,330
  • 19
  • 181
  • 276
Omar
  • 33
  • 1
  • 5
  • whats the expected output after combining? do you want do a normal concatenation operation? – Vihar Mar 02 '15 at 09:44
  • what you have tried so far? – Randyka Yudhistira Mar 02 '15 at 09:46
  • the expected output should be like this: 56ab5620a1203145676461000000000056ab563012800 – Omar Mar 02 '15 at 09:48
  • I wonder why this question marked as duplicate. I am receiving two strings in one seconds..one after another. and these strings are continously coming from a remote device. the problem is how and where I store 1st string and wait for another and then make a new string. this was my question. – Omar Mar 02 '15 at 12:53

2 Answers2

1

You can concatenate or sum the Strings:

String combined = string1 + string2;

Check this question for further information.

Community
  • 1
  • 1
Jordi Castilla
  • 26,609
  • 8
  • 70
  • 109
1

Just use concatenation ( + ) sign.

jhenryj09
  • 45
  • 8