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
Explain the protected field modifier?
Explain about serializable interface in java?
How many boolean functions are there?
What is the syntax and characteristics of a lambda expression? Explain
What are the data types supported by java? What is autoboxing and unboxing?
What is void keyword?
What are the uses of synchronized keyword?
How does sublist works in java?
Write java program to reverse string without using api?
What do you understand by looping in java? Explain the different types of loops.
What do you mean by inner class in java? Explain
What are variable arguments or varargs?
What exceptions occur during serialization?
Should database connections be singleton?
What is numel matlab?