Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

String[] split(regex)

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi,
I posted this as part of another discussion on split() functionality. Reposting this one again in the hope that someone will answer.


I got the following output:
count 8
>< --> I get this one
>1<
>2<
>34<
>567<
>< --> Do not know how you get this empty string here and in the next one.
><
>89<
I don't understand why there are 2 empty strings here. Ankit, Punit, Ruben or anybody please help.
Thanks,
Meera
 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
What are the inputs?
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Here's the original topic...

https://coderanch.com/t/427592/Programmer-Certification-SCJP/certification/Stringsplit-method-functionality


Reposting this one again in the hope that someone will answer.



First, you can argue that this is somewhat like a crosspost... Second, you can further argue that this is an incomplete post. Regardless, please don't start new topics just to drive attention to other topics....

Henry
 
And then the flying monkeys attacked. My only defense was this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic