There is some way to take the second value after the "|" and the last value after | with tokenizer

0
public class NewMain {

public static void main(String[] args) {
    String sTiempo = "hola | argentina | asd | $320.50";
    StringTokenizer st = new StringTokenizer(sTiempo, "|");

    while (st.hasMoreTokens()) {
        System.out.println(st.nextToken());
    }
}

}
    
asked by federico vazquez 30.06.2018 в 03:06
source

0 answers