If you have the length, look at the % arithmetic operator. That will give you the remainder from a division which you can use to see if length is even or not. If you're still stuck, post some code and we'll go from there.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Joined: Apr 15, 2005
i can get the remainder doing this
String s = "somestringvalue";
int n = s.length();
int remainder = n % 2;
but don't know how append String s with x number of 0's to make the String s even