Created
August 16, 2017 16:24
-
-
Save gitjs77/2bd32054ec8a90733ede8a2977733864 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.sql.SQLException; | |
public class ConstructorWithExceptions { | |
public class Parent { | |
public Parent() throws SQLException { | |
} | |
public void method() throws Exception { | |
} | |
} | |
public class Child extends Parent { | |
public Child() throws Exception {// У наследника или такой же или более широкий exception | |
} | |
public void method() throws SQLException {// У наследника или меньше или такой же. | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment