stringa = new String("ciao");
lunghezza = stringa.length;

La lunghezza e' una proprieta' dell'oggetto stringa

ciao