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 depricated methods ?
What is the internal implementation of set in java?
What is module in project?
Can you give names of Container classes?
How to validate the request (Eg:user name and password) in session(http session)? not in LDAP server ?
public class Test { public static void main(String[] args) { int countA = 0; int countB = 0; int countC = 0; int countD = 0; int countE = 0; int countF = 0; int countG = 0; int countH = 0; int countI = 0; int countJ = 0; int countK = 0; int countL = 0; int countM = 0; int countN = 0; int countO = 0; int countP = 0; int countQ = 0; int countR = 0; int countS = 0; int countT = 0; int countU = 0; int countV = 0; int countW = 0; int countX = 0; int countY = 0; int countZ = 0; } } Can anybody tell me any alternate solution(like loop or something) to automate this initialization process. Ex:- for(char chr='A';chr<='Z'; chr++) { (int) String "count"+chr = 0; }
What is module with example?
what is net based application and its types
What is join () in java?
Is Java a dying language?
Why java is free from garbage values??
How to restrict a member of a class from inheriting by its sub classes?