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 |
Why we do exception handling in java and how many types of exceptions are there?
worst case complexities of Quick sort and Merge sort.
What is the difference between a vector & an array list?
Can we extend immutable class?
What is consumer interface?
How do you declare an array in java?
What is java english?
1.) if we use "private" in place of "public" in public static void main()... 2.) if we use "int" in place of "void".... 3.) can we ommit "static" keyword from that statement.... 4.) also can we give the command line arguments type as int type or float,etc.(.i.e (string args[]))
Java Compiler is stored in JDK, JRE or JVM?
How to make a write-only class in java?
difference between String a; and String a=new String();? y do v need to assign memory to the variable?
What is unsigned char?