How to find the length and capacity of a string buffer ?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / therathna
By using length and capacity methods.
For this use JDK api we get complete details
Is This Answer Correct ? | 2 Yes | 2 No |
What is the difference between Trusted and Untrusted Applet ?
How does predicate work in java?
What best practices should you follow while writing multithreaded code in java?
Can an interface extend another interface?
Is null in java?
write a program to create an vector with string(add,remove) operation.and value should be enter through keyboard.
What modifiers are used with a top level class?
What is difference between final and finally in java?
What are the Memory Allocations available in JavaJava?
What are the two types of exceptions in java? Which are the differences between them?
why using interface interface ?
I want to persist data of objects for later use. What’s the best approach to do so?