Java splitting based on dollar

Program:

package com.ngdeveloper.com;
public class JavaSplitDollar {
	public static void main(String[] args) {
		String input = "duo$pulsar$karizma$apache$fzs$platina$glamour$discover$shine$twister$activa";
		String[] split = input.split("\\$");
		for(int i=0;i<split.length;i++){
			String output = split[i].toString();
			System.out.println(output);
		}
	}
}

 

Output:
duo
pulsar
karizma
apache
fzs
platina
glamour
discover
shine
twister
activa

 

 

Thanks for reading this post…….!!!

607 total views, 1 views today

About Mirthbees 672 Articles
Blogger, Innovator, Developer and Enterpreneur. Founder of GuruRecharge, Readymade online recharge script. Lead Developer in Bookrate.in

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.