troubleshooting Question

Split() in Java

Avatar of techbro
techbroFlag for United States of America asked on
5 Comments1 Solution330 ViewsLast Modified:
When I try this code below, a String array containing 3 elements is returned. But if you take a look at the code, there are two more semicolons in the end.

My question is, why 3 elements is returned instead of 4 elements since the space could also be counted and stored in the String array?


Open in new window

I will appreciate your response!
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros