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 scope & storage allocation of static, local and register variables? Explain with an example.
What is the difference between ArrayList and Vector? which one is better in Java
What is an infinite loop?
What is java used for?
What are the restrictions imposed by a Security Manager on Applets?.
What is the common usage of serialization? What exceptions occur during serialization?
How many bytes is a url?
Have you ever used hashtable and dictionary?
Does constructor return any value?
What is meant by method?
What is the full form of jpeg?
What are the different types of collections in java?
what is a working thread? : Java thread
Which method must be implemented by all threads?
Explain throw keyword in java?