getting part of a string java code example
Example 1: extract one string java
int pos = 0; //Arbitrary position, can be any number
"String".substring(pos, pos+1);
Example 2: how to substring in java
class scratch{
public static void main(String[] args) {
String hey = "Hello World";
System.out.println( hey.substring(0, 5) );
// prints Hello;
}
}