-5
static String[] name = {"Alberts, Nancy", "Bly, Joshua", "Cox, Alex", 
                        "Hood, Ben", "Kelly, Amber", "Lizarde, Adriana", 
                        "Olson, Ashely," + "Perez, Julisa", "Perez, Maria",
                        "Rhodes, Jonathan"};

I need to write a

public static String getName(String[] array) {
    ?
}

but idk what to put inside in order to get it to print in the main class

Turing85
  • 18,217
  • 7
  • 33
  • 58
Help
  • 1

1 Answers1

0

Your question is not clear.

static String[] name = {"Alberts, Nancy", "Bly, Joshua", "Cox, Alex", 
        "Hood, Ben", "Kelly, Amber", "Lizarde, Adriana", 
        "Olson, Ashely," + "Perez, Julisa", "Perez, Maria",
"Rhodes, Jonathan"};

public static void main(String[] args) {
    for(String s: name) {
        System.out.println(s);
    }
}
public static String[] getName() {
    return name;
}

Is this what you're trying to do?

Gaurav Kumar
  • 136
  • 8