What is a split() function?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is a split() function?
Rating:
A split() function was added to Java 1.4. It belongs to the String class. It simplifies the task of breaking (splitting) a string into substrings or tokens. As an argument to split(), a character (or a blank space) is passed where the string is split. The signature of a split function is as follows:
where, regex is a regular expression to be split.
Rating:
Was this information helpful?
Other articles
- What is the increment operator?
- New features in Java certification exam.
- What is the wait() method?
- What is a constructor?
- What is the replace() method?