The document contains two Java programs. The first program accepts 'n' integers from the user, stores them in an ArrayList, and displays the elements. The second program defines a class `MyNumber` that includes methods to check if a number is negative, positive, odd, or even, and demonstrates its functionality using command-line arguments.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
2 views
SLIP 2
The document contains two Java programs. The first program accepts 'n' integers from the user, stores them in an ArrayList, and displays the elements. The second program defines a class `MyNumber` that includes methods to check if a number is negative, positive, odd, or even, and demonstrates its functionality using command-line arguments.