Guest User

Untitled

a guest
Jun 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. public static String lem() {
  2. System.out.println("lem");
  3. return "return from lem";
  4. }
  5.  
  6. public static String foo() {
  7. int x = 0;
  8. int y = 5;
  9. try {
  10. System.out.println("start try");
  11. int b = y / x;
  12. System.out.println("end try");
  13. return "returned from try";
  14. }
  15. catch (Exception ex) {
  16. System.out.println("catch");
  17. return lem() + " | returned from catch";
  18. }
  19. finally {
  20. System.out.println("finally");
  21. }
  22. }
  23.  
  24. public static void bar() {
  25. System.out.println("start bar");
  26. String v = foo();
  27. System.out.println(v);
  28. System.out.println("end bar");
  29. }
  30.  
  31. public static void main(String[] args) {
  32. bar();
  33. }
Add Comment
Please, Sign In to add comment