Ernest Friedman-Hill wrote:
nitinram agarwal wrote: why java has allowed this and why does not it generate compile error if we want to return some value from the finally block.
Indeed -- many people consider this a defect in the language specification. Some compilers -- Eclipse's Java compiler is one -- will warn you about this.