Hello, good evening. 
@bhanuchandar.k
Thanks for the brief explaination.
@im2amit and petrib
Thanks for helping me as well.
@ to all
I use this code to capitalize the first letter of every sentence.
Code:
public static String capitalize(String str)
{
char[] arr = str.toCharArray();
boolean cap = true;
boolean spacefound = true;
for (int i = 0; i < arr.length; i++)
{
if (cap)
{
if (arr[i] == ' ')
{
spacefound = true;
}
else
{
if (spacefound && !Character.isUpperCase(arr[i]))
{
arr[i] = Character.toUpperCase(arr[i]);
cap = false;
spacefound = false;
}
}
}
else
{
if (arr[i] == '.' || arr[i] == '?' || arr[i] == '!')
{
cap = true;
}
}
}
return new String(arr);
}
But if I will send the message twice, the result would be this --> YOu are so nice. WHere do you live? WHat is ur name?
It should be "You are so nice. Where do you live? What is ur name?" even if I'll send it twice or more. What's lacking with the code?
Here's my code in the send command, I just copy the part where the string should be capitalize:
Code:
capital = capitalize(temp);
message = new TextBox ("Message", capital, 2000,TextField.ANY);