How to find the length and capacity of a string buffer ?
Answer Posted / vijayakumar chinnasamy
StringBuffer conatain a method called length() to find out
the length and capacity() to findout the capacity of
stringbuffer.
ex:
StringBuffer buffer=null;
buffer.length();
buffer.capacity();
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is the main advantage of passing argument by reference?
What is a variable in java?
How many bytes is double?
When will we use them?
What class of exceptions are generated by the java run-time system?
Can main() method in java can return any data?
What is size_t?
What is a function argument in java?
Are arrays passed by reference in java?
What is a qualifier in a sentence?
How many bits is a float?
What is boolean in java?
How do you change an int to a string?
Explain about narrowing conversion in java?
Mention some interfaces implemented by linked list in java.