I had used the following code to find the length
String str=strLenData.toString();
int ipLen= str.length();
return ipLen;
ipLen would return 11 every time. whatever be the actual value of strLenData. when I call toString() function, value of str: “[C@40523f80“. Now I have to use char[] and i need to know the end (or length) of char[].
How do I do it?
If I understand correctly the
strLenDatavariable is a char[]? In that case, you can just doreturn strLenData.length;.