Lab2 2024 2025
Lab2 2024 2025
b. Calculates and prints the sum of all the elements in the array.
c. Finds and prints the maximum and minimum values in the array.
d. Searches for a specific value (e.g., 19) in the array and prints whether it's found or not.
f. Sorts the array in ascending order and prints the sorted array.
g. Removes a specific element (e.g., 31) from the array and prints the modified array.
2. Make sure to use loops, conditional statements, and appropriate array manipulation
methods to accomplish these tasks.
3. Test your program with different arrays and values to ensure it works correctly.
Implement a program that analyzes a given string to calculate the word count, character
count, and determine if it contains a specific character.
4. Use the Character class to check if a specific character (e.g., 'H' or 'A') is uppercase or
lowercase, and print the result.
5. Use the Math class to calculate and print the square root of a number (e.g., 16) and the
absolute value of a number (e.g., -25).