I have a problem when making an append to a StringBuilder
from a linkedList
and display it in the form of long, the code is as follows:
for (int i=0; i < new_list.size(); i++)
{
stb.append(new_list.get(i));
Log.d("numbers stored", String.valueOf(new_list.get(i)));
}
Log.d("each value from", String.valueOf(new_list.toString()));
Long requestLong = Long.parseInt(stb.toString());
Log.d("each value from", String.valueOf(requestLong));
return Long.valueOf(requestLong);
the value of LinkedList
results in this:
[0, 8, 4, 6, 8, 9, 7, 0]
which is the desired but at the time of making the append and using the method of Long.valueOf
the result is as follows: 8468970
How can I do to show exactly the value that is stored in LinkedList
?, for your attention, thanks.