How to find the length and capacity of a string buffer ?

Answers were Sorted based on User's Feedback



How to find the length and capacity of a string buffer ?..

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

How to find the length and capacity of a string buffer ?..

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

Post New Answer

More Core Java Interview Questions

What are data types in oop?

0 Answers  


What are daemon Threads in java?

0 Answers   Impetus,


Differentiate Vector and ArrayList?

6 Answers   Max Telecom, Wipro,


What is scanner in java?

0 Answers  


What is the final class modifier?

0 Answers  






What is string manipulation?

0 Answers  


What are the differences between wait() and sleep()?

0 Answers  


can we create a instance for intwerface?

3 Answers  


You're given a Boolean 2D matrix, can you find the number of islands?

0 Answers   Amazon,


What is exception propagation?

0 Answers  


What is the full name of java?

0 Answers  


why the wait,notify,notifyall methods are placed in object class?these are the thread concepts why these methods are placed in Object class?

2 Answers   Global Logic, Satyam,


Categories