Java | Functions | Question 7
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