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 are decalarations?
This is related to threads. I have a class with synchronized method m1(). Can I create different instances of this class and execute the m1() for different threads?
What ide should I use for java?
What is try-with-resources in java?
How to create a fecelet view?
Difference between string s= new string (); and string s = "abv";?
How do you use wildcards?
Can we use a switch statement with strings?
What is an iterator java?
they asked class A{} class B{} class c{} all the three class saved as a single file,there is no main method in the file and anothe class M.java class m { psvm(String args[]) { // here the parent class can access } }
2 Answers DNS, IPSR Solutions,
Explain the difference between transient and volatile in java?
Is java pass by value or pass by reference?