Create a Simple Banking Application Program Using Autoboxing and Unboxing in java

create-a-simple-baking-application-using-autoboxing-and-unboxing-in-java

Hey, welcome to practice house. in this post i am going to sharing a program to creating a simple banking application. It’s a challenge for autoboxing and unboxing in java. So we are going to create a simple banking application using autoboxing and unboxing java.

So, What is Autoboxing and Unboxing in Java ?

Autoboxing is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper classes. For example, converting an int to an Integer, a double to a Double, and so on. If the conversion goes the other way, this is called unboxing.

Autoboxing and unboxing lets developers write cleaner code, making it easier to read. The following table lists the primitive types and their corresponding wrapper classes, which are used by the Java compiler for autoboxing and unboxing.

PRIMITIVE TYPES WRAPPER CLASS
boolean Boolean
byte Byte
char Character
float Float
int Integer
long Long
short Short
double Double

okay now let’s create our program.

DOWNLOAD THE WHOLE PROJECT : Banking Application

Step 1: Create a simple java application. create a project by named com.practice.house . then we will create Customer.java . in this file we will implement our customer and his addTransaction method. here is the code

File: Customer.java

Step 2:  we will create our Branch.java .

File: Branch.java

Step 3: Create a Bank.java

File: Bank.java

Step 4: Create our main class called Main.java. here we will implement all this methods. So let’s see the functionality of our program.

okay folks, i think you have all the idea like how our application is working now time to see our output. you can change the value and can see different output. but now i show you my output that i got from this application.

OUTPUT:

Man is Mortal. so if you found any mistakes in this program. please correct me. and i hope it will help you to solve this challenge called Create a simple banking application using autoboxing and unboxing in java.

HAPPY CODING … HAPPY LIVING !!!

DOWNLOAD THE WHOLE PROJECT : Banking Application

Leave a Reply

avatar
  Subscribe  
Notify of