Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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 clone

2. Compile the Java Files:
- javac ArrayListOperations.java TestOperations.java

3. Run the Application:
- java TestOperations

4. 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.