vendredi 27 février 2015

Java , add new string object if the length of the chain exceeds a number of character



I'm trying to add a new String in arraylist if the lenght of this one is too big.


like that;



private void createLore(String s) {
ArrayList<String> a = new ArrayList<String>();
if(s.lenght > maximumLenght) {
a.add(s /TODO new object with same string
//it's like a new line .. possible to detect a space ?
//This avoids the cut of a text


Thank's !




Aucun commentaire:

Enregistrer un commentaire