How to split string in Java?

Hi,

I have a string seperated by ',' comma. How to split the string?

Thanks

View Answers

September 12, 2014 at 5:26 AM

Hi,

You may use following code:

String subStr[] = imageStyle.split(",");

There is a method split() which can be used for splitting a string based on the delimiter.

Thanks


September 12, 2014 at 5:28 AM

Hi,

Please check the tutorial.

java.lang.String.split().

Thanks









Related Tutorials/Questions & Answers:
Advertisements