Docsity

Formulario programmazione ad oggetti, Formulari di Programmazione Java

Toggle sidebar
bg1
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<Object o>
Collections.sort(Collection c, new Comparator());
Other methods and operators
instanceof
System.out.println()
abs(double a)
max(double a,double b) and min(double a, double b)
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();} }
1

Anteprima parziale del testo

Scarica Formulario programmazione ad oggetti e più Formulari in PDF di Programmazione Java solo su Docsity!

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 Collections.sort(Collection c, new Comparator()); Other methods and operators instanceof System.out.println() abs(double a) max(double a,double b) and min(double a, double b)

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();} }