Wednesday, September 18, 2013

Adding the last element to string after array

Adding the last element to string after array

My storage string gives me all the digits in want besides the last, I know
its because the last digit has nothing to compare to the right. Can I add
the last digit to the end of my string somehow,
for(int i = 0;i < othercontent.length -1 ;i++ )
{
if(othercontent[i] != othercontent[i + 1])
{
storage = storage + othercontent[i];
}
}

No comments:

Post a Comment