what is the difference between the StringBuffer vs StringBuilder Vs StringTokenizer on the internal implementation. when to use these . kindly waiting for the answer.
Update:-
I am also going through the source code.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
StringBuffer– introduced in JDK 1.0 – is thread safe (all of its methods aresynchronized), whileStringBuilder– since JDK 1.5 – is not. Thus it is recommended to use the latter under normal circumstances.StringTokenizeris meant for a whole different purpose then the former two: cutting strings into pieces, rather than assembling. As @Henning noted, it is also “retired” since JDK 1.5 – it is recommended to useString.splitinstead.