Karten 83 Karten
Lernende 1 Lernende
Sprache English
Stufe Andere
Erstellt / Aktualisiert 02.05.2019 / 03.05.2019
Lizenzierung Keine Angabe
0 Exakte Antworten 83 Text Antworten 0 Multiple Choice Antworten
Fenster schliessen

Does DateTimeFormatter throw a Checked Exception or an uncheced?

It throws a DateTimeException which is a RuntimeException

Fenster schliessen

Is it dangerous to ommit the generic type when using Predicate or Function?


  1. Compiler Warning
  2. Auto Boxing might not work as Expected, eg. boolean will neither be autoboxed into a Boolean nor Object!
Fenster schliessen

Does forEach accept an implementation of Function?

No, only a Consumer implementation!

Fenster schliessen

What happens when catching an checked exception that is not declared by any method in the try block?

The code will not compile!

Fenster schliessen

Can you declare a Method as final?

Yes, instance methods, but not static methods!

Fenster schliessen

Must a ENUM enumeration end with a Semicolon?

The semicolon is only required when methods/constructors are declared afterwards!

Fenster schliessen

What is the difference between Optional.orElse(...) and Optional.orElseGet(...)?

  • Optional.orElse(T) returns the provided value
  • Optional.orElseGet(Supplier<? extends T>) uses the provided supplier to get the default value
Fenster schliessen

Can a Properties Class be instantiated using a Constructor?