Most of the times transactions are important when we deal with JDBC. When we perform database operations if we don't realize the importance of transactions it will end up with a tragedy. I have created a scenario to demonstrate the importance of a transaction.
Lets assume a scenario where a transaction credit 500 rs from user1 and debit that 500 rs to user2 .
initial state of accounts