StringTokenizer and StringBuffer
StringTokenizer is in java.util package which is used to separate the given string into individual tokens. The difference here is that
StringBuffer is also in java.util package. It differs from the String by its mutable character. That is, the string's length and content stored in it can be changed in course of time.
ArrayList
ArrayList in java.util package which is advantageous because of its capability to store any kind of object. It is similar to array but the difference comes when efficiency(in storing the contents) is required.
StringTokenizer is in java.util package which is used to separate the given string into individual tokens. The difference here is that
StringTokenizer methods do not distinguish among identifiers, numbers, and quoted strings. Also they wont recognize and skip comments. That is, it even takes the commented lines in your program also String.StringBuffer is also in java.util package. It differs from the String by its mutable character. That is, the string's length and content stored in it can be changed in course of time.
ArrayList
ArrayList in java.util package which is advantageous because of its capability to store any kind of object. It is similar to array but the difference comes when efficiency(in storing the contents) is required.
No comments:
Post a Comment