Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Übung 13_6 #72

Open
MartinX3 opened this issue Feb 10, 2018 · 0 comments
Open

Übung 13_6 #72

MartinX3 opened this issue Feb 10, 2018 · 0 comments
Assignees
Milestone

Comments

@MartinX3
Copy link
Member

Aufgabe 6 [Theorie]
Gegeben ist der folgende Code:

import java.io.*;
class Schriftstueck {
 void lese() throws IOException {}
}
public class Zeitung extends Schriftstueck {
 public static void main(String[] args) throws IOException {
   new Zeitung().lese();
  }
  // Deklaration von lese()
}

Für welche der folgenden Deklarationen von Methode lese, jeweils eingefügt für die Zeile mit dem Kommentar „Deklaration von lese()“, lässt sich der Quelltext kompilieren?

  • void lese() { }

  • void lese() throws Exception { }

  • void lese(int x) throws Exception { }

  • void lese() throws FileNotFoundException { }

  • void lese() throws RuntimeException { }

Erläutern Sie jeweils in einem Satz, warum eine Kompilierung möglich bzw. nicht möglich ist.

@MartinX3 MartinX3 added this to the Übung_13 milestone Feb 10, 2018
@MartinX3 MartinX3 added this to To do in EIDIP_2017_WS via automation Feb 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
EIDIP_2017_WS
  
To do
Development

No branches or pull requests

2 participants