Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. import java.sql.SQLException;
  2.  
  3. public class ConstructorWithExceptions {
  4.  
  5. public class Parent {
  6.  
  7. public Parent() throws SQLException {
  8. }
  9. public void method() throws Exception {
  10. }
  11. }
  12. public class Child extends Parent {
  13.  
  14. public Child() throws Exception {// У наследника или такой же или более широкий exception
  15. }
  16. public void method() throws SQLException {// У наследника или меньше или такой же.
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement