we know that a class will compile if no catch along with try but have finally but what happens if there is an arithmetic exception in the try block????

try and see for yourself.
You're annoying with your flooding of this place with stupid "questions" that show only that you have no clue whatsoever about anything.

it works fine. even if any kind exception is raised at runtime the finally() method will be called irrespective of what kind of exception it thrown.

Hey there satya5321,

You have answered a couple of threads in the Java forum today that have already been fairly well finished and are over three weeks old. Please check the date of the last post before replying to a thread.

Cheers,
darkagn

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.