What is the result?

Given:

What is the result?

Given:

What is the result?

A.
John-.-George-.-Paul-.-Ringo

B.
John
George
Paul
Ringo

C.
John -George -Paul -Ringo -D. An exception is thrown at runtime

E.
Compilation fails

Explanation:

The split() method is used to split a string into an array of substrings, and returns the new array.
regex: – followed by two characters



Leave a Reply 2

Your email address will not be published. Required fields are marked *