Skip to content

AditShh-git/Banking-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Core Java Banking System 🏦

A simple command-line (CLI) banking application built with pure Java and JDBC. This project demonstrates foundational knowledge of Java, object-oriented programming (OOP), and direct database management using SQL.

The application allows users to create accounts, deposit funds, withdraw money, and transfer funds between accounts, all powered by a MySQL database.


Core Concepts Demonstrated

This project was built to master the fundamentals before moving to frameworks like Spring. The key concepts are:

  • JDBC (Java Database Connectivity): All database operations are performed using the core Java JDBC API. This includes creating Connection, Statement, and ResultSet objects.
  • SQL Transactions (Data Integrity): The fund transfer feature uses SQL transactions. By setting Connection.setAutoCommit(false), the application ensures that money is only moved if both the withdrawal from the sender and the deposit to the receiver are successful. If either fails, the Connection.rollback() is called to prevent data corruption.
  • Object-Oriented Programming (OOP): The system is modeled with classes like User, Account, and BankService to organize logic and manage data.
  • Exception Handling: Uses try-catch-finally blocks to properly manage SQLExceptions and ensure that database connections are always closed (even if an error occurs) to prevent resource leaks.

✨ Features

  • Create a new user account.
  • Deposit money into an account.
  • Withdraw money from an account.
  • Transfer funds safely from one account to another (uses SQL transactions).
  • Check account balance.

🛠️ Technology Stack

  • Language: Java
  • Database: MySQL
  • Driver: JDBC (MySQL Connector/J)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages