-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain_85.java
More file actions
35 lines (35 loc) · 786 Bytes
/
Main_85.java
File metadata and controls
35 lines (35 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
public class Main_85 {
public static int greet(){
try{
int a=5;
int b=2;
return a/b;
}
catch(Exception e){
System.out.println(e);
}
finally {
System.out.println("end of program");
}
return 0;
}
public static void main(String[] args) {
int c=greet();
System.out.println(c);
int a=7;
int b=9;
while(true){
try{
System.out.println(a/b);
}
catch (Exception e) {
System.out.println(e);
break;
}
finally {
System.out.println("final value for b= "+b);
}
b--;
}
}
}