Thursday, 4 July 2019

Split String and Store it in an array

public class RegTest {

public static void main(String[] args) {
String s = "you,are,my";
String[] test = s.split("[^a-zA-Z]+");
for(String strPrint  : test )
{
System.out.println(strPrint);
}
}
}

No comments:

Post a Comment

Pass a HashMap from Angular Client to Spring boot API

This example is for the case where fileData is very huge and in json format   let map = new Map<string, string>()      map.set(this.ge...