Eventuali duplicati: metodo
Java split() method strips empty strings at the end?metodo split della classe String non include trascinamento stringhe vuote
La scissione di classe String non include trascinamento stringhe vuote nell'array restituisce. Come faccio ad avere passato questa restrizione:
class TestRegex{
public static void main(String...args){
String s = "a:b:c:";
String [] pieces = s.split(":");
System.out.println(pieces.length); // prints 3...I want 4.
}
}
Perfetto. Grazie :) – gameover