Hibernate How split string by charcter ( using Java


/**
*
*/
package com.onlinecodegeek.java.string.ex;

/**
* @author tponnam
*
*/
public class SplitStringDemo {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String demoText="hello(world(Welcome(Java";
String temp[] = demoText.split("\\(");
for(String text:temp){
System.out.println(text);
}

}

}

Output:


hello
world
Welcome
Java

 

SHARE

    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment