Skip to content

sharvarii3/JAVA-_Array_Functions

Repository files navigation

Overview

This Java program provides essential array-related operations, including:

Even-Odd Classification: Separates even and odd numbers from an input array.

Consecutive Difference: Finds two neighboring numbers with the smallest difference.

Array Conversions: Converts between arrays and ArrayLists.

User Input Handling: Accepts an array from the user dynamically.

Files Structure

1. Main.java

The entry point of the program.

Calls the functions defined in ArrayFunctions.java.

2. ArrayFunctions.java

Implements various array operations, including:

evenOdd(): Classifies even and odd numbers.

ConsecutiveDiff(): Finds two numbers with the smallest difference.

convertToArrayList(int[] array): Converts an array to an ArrayList.

convertToArray(List list): Converts an ArrayList to an array.

display(List array): Prints an array.

3. userInput.java

Handles user input.

Reads an array from the user dynamically.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages