Post

🌒 Eclipse IDE
🌒 Eclipse IDE@EclipseJavaIDE·
It will print "1". The 'finally' block is *always* run after 'try', no exception ;)
English
1
3
11
0
chaitanya chinta
chaitanya chinta@chintachaitanya·
@EclipseJavaIDE Try block should be followed by either one catch block and/or one finally block. In presence of finally block, Control skips return statements in try and catch blocks, jumps to finally block and returns back to try catch block if no return statement on finally block. Ans: 1
English
1
0
12
0
Maneesh Sharma
Maneesh Sharma@Maneesh05232208·
@EclipseJavaIDE The control goes to return statement in try block but it does not return from there. Eventually it executes return statement from finally block and prints “1” on console.
English
0
0
0
0
vishal
vishal@vishalagrawal_·
@EclipseJavaIDE 1 as final return is 1 from getString() method.
English
0
0
0
0
Paylaş