Predict the output of the following program.
ab cd ef gh ij kl
ab cd;ef gh;ij kl
(C) Compilation error
Class String has a inbuilt parameterized constructor String(character_array) which initializes string ‘str’ with the values stored in character array.
The split() method splits the string based on the given regular expression or delimiter passed it as parameter and returns an array.
Quiz of this Question
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.