Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sudarika/array-list-operations
This project provides two main operations on an ArrayList of integers: removing odd numbers and doubling even numbers. The operations are demonstrated through a simple Java application.
https://github.com/sudarika/array-list-operations
arraylist java jdk
Last synced: about 1 month ago
JSON representation
This project provides two main operations on an ArrayList of integers: removing odd numbers and doubling even numbers. The operations are demonstrated through a simple Java application.
- Host: GitHub
- URL: https://github.com/sudarika/array-list-operations
- Owner: Sudarika
- Created: 2024-01-08T06:58:09.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-07-10T13:54:55.000Z (6 months ago)
- Last Synced: 2024-10-13T03:41:40.692Z (2 months ago)
- Topics: arraylist, java, jdk
- Language: Java
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ArrayList Operations
This project provides two main operations on an ArrayList of integers: removing odd numbers and doubling even numbers. The operations are demonstrated through a simple Java application.# Project Structure
- ArrayListOperations.java: Contains methods for removing odd numbers and doubling even numbers.
- TestOperations.java: Contains the main method to test the operations with user input.# Prerequisites
- Java Development Kit (JDK) installed on your machine.
- A Java IDE or a text editor with Java support.# How to Run
1. Clone the Repository:
- git clone2. Compile the Java Files:
- javac ArrayListOperations.java TestOperations.java3. Run the Application:
- java TestOperations4. Input:
- The application will prompt you to enter 5 integer values.5. Output:
- The original list of numbers.
- The list after removing odd numbers.
- The list after doubling the even numbers.# Classes and Methods
## ArrayListOperations
- removeOddNumbers(ArrayList numbers): Removes all odd numbers from the given list.
- doubleEvenNumbers(ArrayList numbers): Doubles all even numbers in the given list and returns a new list.## TestOperations
- Contains the main method to read input from the user, call the operations, and display the results.