0% found this document useful (0 votes)
3 views8 pages

Java Class Examples for Array Operations

The document outlines the definitions of several classes for different tasks in programming. It includes a class for accepting and searching double values in an array, checking if a 3x3 array is special based on the sum of even and odd elements, sorting an integer array using selection sort, and validating a Gmail ID based on specific criteria. Each task emphasizes user input and specific conditions for processing data.

Uploaded by

shazli.p28
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views8 pages

Java Class Examples for Array Operations

The document outlines the definitions of several classes for different tasks in programming. It includes a class for accepting and searching double values in an array, checking if a 3x3 array is special based on the sum of even and odd elements, sorting an integer array using selection sort, and validating a Gmail ID based on specific criteria. Each task emphasizes user input and specific conditions for processing data.

Uploaded by

shazli.p28
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

3.

Define a class to accept values into an array of


double data type of size 20. Accept a double value
from the user and search in the array using linear
search method. If value is found display the
message “Found” with its position where it is
present in the array. Otherwise display the message
“not found”.
4. Define a class to accept values into a 3×3 array
and check if it is a special array. An array is a
special array if the sum of the even number = sum
of odd elements.
5. Define a class to accept values in integer array of
size 10. Sort them in an ascending order using
selection sort technique . Display the sorted array .
6. Define a class to accept a gmail id and check for
its validity.
A gmail id is valid if it has:
• @
• . (dot)
• Gmail
• Com

You might also like