Answer:
Here's an example Java application that stores the names of family and friends in a one-dimensional array of Strings and performs the requested operations:
public class NameArrayDemo {
public static void main(String[] args) {
// Define the array of names
String[] names = {"Alice", "Bob", "Charlie", "David", "Emily", "Frank"};
// Loop through the array and display each name in upper case
System.out.println("Names in upper case:");
for (String name : names) {
System.out.println(name.toUpperCase());
}
// Loop through the array and display each name in lower case
System.out.println("\\Names in lower case:");
for (String name : names) {
System.out.println(name.toLowerCase());
}
// Loop through the array and display the first character of each name
System.out.println("\\First character of each name:");
for (String name : names) {
System.out.println(name.charAt(0));
}
// Loop through the array and display the length of each name
System.out.println("\\Length of each name:");
for (String name : names) {
System.out.println(name.length());
}
}
}
When you run this program, it should output the following:
Names in upper case:
ALICE
BOB
CHARLIE
DAVID
EMILY
FRANK
Names in lower case:
alice
bob
charlie
david
emily
frank
First character of each name:
A
B
C
D
E
F
Length of each name:
5
3
7
5
5
5
I hope this helps!
Step-by-step explanation: