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 equal sign?
What are different access specifiers in java?
What is flush buffer?
Is java hashset ordered?
Write a program to print 15 random numbers using foreach of java 8?
List some oops concepts in java?
What do you mean by static variable?
If an application has multiple classes in it, is it okay to have a main method in more than one class?
What are the important features of Java 8 release?
What is an infinite loop in java? Explain with an example.
What is collection sort in java?
What is the difference between interface & abstract class?
What is the difference between member variables initialization and assignment in a constructor?
How to check if a list is sorted in java?
What is void in java?