java extract substring from string code example
Example 1: extract one string java
int pos = 0; //Arbitrary position, can be any number
"String".substring(pos, pos+1);
Example 2: java get substring
// substring(int begin, int end)
String n = "hello there general kenobi";
System.out.println(n.substring(6, 11));
// -> "there"