Coders Packet

create, update, delete and sort array of objects in Java

By Satvik Singh Sengar

Make method calls to create, update, delete, and sort an array of type objects of a particular class in Java

Here, we will make five methods to perform given operations on the data inserted.

Code consists of two classes User and UserBO.

We make the User class object to store the inputs in the array of type User.

UserBO class have the methods to perform functions on the objects in the array.

Make method calls to create, update, delete, and sort array objects using Java

1. addUser - to add the users in the strictly specified size array.

2. addNewUser - add a new user by increasing the array size by one.

3. sortUser - sort the array based on the names of User class objects.

4. deleteUser - delete the User class object with the given name.

5. displayAll - display all the details of the objects present in the array.

 

Download Complete Code

Comments

No comments yet

Download Packet

Reviews Report

Submitted by Satvik Singh Sengar (satviksinghsengar)

Download packets of source code on Coders Packet