
Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!

String Methods List length() isEmpty(), isBlank() getChars(), toCharArray() equals(), hashCode() and equalsIgnoreCase() compareTo() and compareToIgnoreCase() startsWith() and endsWith() indexOf() and lastIndexOf() substring() and subSequence() concat() replace(), replaceFirst(), and replaceAll() contains() split() join() toLowerCase() and toUpperCase() trim(), strip(), stripLeading(), and stripTrailing() valueOf() and copyValueOf() repeat() Integer.parseInt() Double.parseDouble() charAt() TreeMap Methods List clear() put(K key, V value) and putAll(Map m) remove(Object key) get(Object key) firstKey() and lastKey() containsKey(Object key) containsValue(Object value) size()
values() replace(K key, V value) replace(K key, V oldValue, V newValue) LinkedList Methods List add(Object item) and add(int index, Object item) addAll(Collection c) addAll(int index, Collection c) addFirst(Object item) and addLast(Object item) clear() contains(Object item) get(int index) getFirst() and getLast() indexOf(Object item) lastIndexOf(Object item) remove(int index) and remove(Object obj) removeFirst() and removeLast() set(int index, Object item) size() Compare and sort compareTo() equals() Integer.compare() Double.compare() implements Comparator
Leggi File public void leggiDaFile(String nomeFile) { try { FileReader fr = new FileReader(nomeFile); BufferedReader br = new BufferedReader(fr); String riga; while( (riga = br.readLine())!= null ) { String [ ] array = riga.split(”;”);} br.close(); fr.close(); } catch(Exception e) { e.printStackTrace();} }