From a21303114c08cee6b8471a7c1f38605ddd75416a Mon Sep 17 00:00:00 2001 From: SirTeruki Date: Thu, 16 May 2019 19:22:37 +0200 Subject: [PATCH] Initial commit for 6.1 and 6.2 I tried to answer the questions given by the task 6.1 and 6.2 I created the files in ressources-> 6 --- src/main/resources/6/1_Menge&Multimenge | 4 ++++ src/main/resources/6/2_Exceptions&Generic | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 src/main/resources/6/1_Menge&Multimenge create mode 100644 src/main/resources/6/2_Exceptions&Generic diff --git a/src/main/resources/6/1_Menge&Multimenge b/src/main/resources/6/1_Menge&Multimenge new file mode 100644 index 0000000..a75a9da --- /dev/null +++ b/src/main/resources/6/1_Menge&Multimenge @@ -0,0 +1,4 @@ +A Menge alles Großbuchstaben +REGENWETTER +Menge: {R,R,E,E,E,G,N,W,T,T} oder {R,E,G,N,W,T} +Multimenge: {(R,2), (E,3), (G,1), (N,1), (W,1), (T,2)} \ No newline at end of file diff --git a/src/main/resources/6/2_Exceptions&Generic b/src/main/resources/6/2_Exceptions&Generic new file mode 100644 index 0000000..a60cf6d --- /dev/null +++ b/src/main/resources/6/2_Exceptions&Generic @@ -0,0 +1,17 @@ +try { +// ... +} catch (GenericException e) { +// ... +} catch (GenericException e) { +// ... +} +Das funktioniert nicht zur Laufzeit, da Aufgrund von Type Erasure +wir zwei gleiche catch hätten. + +try { +throw new GenericException (); +} catch (GenericException e) { +// ... +} + +Auch hier funktioniert das nicht zur Laufzeit aufgrund von Tyüpe Erasure.