String s="abcd";
char[] a=s.toCharArray();
String[] array = values.split("|", -1);
String str= "abcdef";
String[] array=str.split("(?<=G.{2})");
System.out.println(java.util.Arrays.toString(array));
class Test {
public static void main( String[] args) {
String[] result = "Stack Me 123 Heppa1 oeu".split("a");
// output should be
// S
// t
// a
// c
// k
// M
// e
// H
// e
// ...
for ( int x=0; x<result.length; x++) {
System.out.println(result[x] + "
");
}
}
}
Code Example |
---|
:: jbutton set on action |
:: |
Java :: java check if enum contains value |
:: |
:: |
:: generate 5 digit random string in java |
:: how to convert epoch time to date in java |
Java :: |
:: count vowels in java |
:: |
:: bootstrap 4 modal get event related target |
:: |
:: |
:: Why should we mention a method throws some exception/s? |
:: |
:: android studio change image on button click |
Java :: android play sound file from assets |
:: |
:: how to get last element of array java |
:: |
:: |
:: |
:: load file as string java |
:: |
:: |
:: |
:: viewpager androidx dependencies |
Java :: |
Java :: |
:: |