fdsa


J. F.
Diese Karteikarten bieten einen umfassenden Überblick über die Java-Programmierung, insbesondere zu Themen wie Dateiverarbeitung, Funktionen und Sammlungen. Sie decken wichtige Konzepte wie das Arbeiten mit Pfaden, Dateien und Strings ab, sowie das Verhalten von Sammlungen und deren Sortiermethoden. Die Karteikarten sind ideal für Entwickler, die ihr Wissen in Java vertiefen möchten, insbesondere in Bezug auf die Handhabung von Sammlungen, das Sortieren und Vergleichen von Objekten sowie die Verwendung von Stream-APIs und Collectors.
Karten
496
Lernende
3
Sprache
Deutsch
Kategorie
Informatik
Stufe
Andere
Erstellt / Aktualisiert
06.12.2020 / 24.01.2021

Lernkarten

Whats the static comparator-method for sorting using the order specified by the comparable implementation on the object itself?

naturalOrder()

Whats the static comparator-method for sorting using the reverse of the order specified by the Comparable implementation on the object itself?

reverseOrder()

Whats the default-method in comparator for reversing the order of the chained comparator?

reversed()

Whats the default-method in comparator if the previous comparator returns 0 se this comparator that returns a double/int/long , otherwise return the value form the previous comparator

thenComparingDouble(function) / thenComparingInt(function)  / thenComparingLong(function)

When can we use Collections.sort()?

When the objects to be sorted are Comparable

What are the preconditions for Collections.binarySearch?

Must be sorted 

What cant be done with genericTypes?

  • calling a constructor
  • creating an array of that generic type
  • calling instanceof
  • using a primitive type as a generic type parameter
  • creating a static variable as a generic type parameter

What happns if you add list.removeIf on a list which was created by list.of()?

unsupportedOperation

Lernen