Search for names in a hard-coded list of contacts I am currently taking a class at my local community college for java programming as well as trying to learn as much as I can on my own time. I would like your opinion on a program I wrote that would display any results matching a user inputted search term. It works, but I feel like it could be written better or even be made more effective, I'm not sure as I am still kind of new to Java. Could you please let me know if I am doing anything wrong like bad coding habits, doing things that are more easily done with better code, or suggest anything you think I should improve upon.

package controller;
import java.util.Scanner;

public class PhoneListDemo {

    public static void main(String[] args) {

        promptUser();

    }
    public static void promptUser() {

        Scanner keyboard = new Scanner(System.in);
        System.out.println("Enter a name or characters to search for: ");
        String userSearch = keyboard.nextLine();
        keyboard.close();
        searchAndDisplay(userSearch);
    }
    public static void searchAndDisplay(String userSearch) {

        String[] names = {"Harrison, Rose", "James, Jean", "Smith, William", "Smith, Brad"};
        String[] phone = {"555-2234", "555-9098", "555-1785", "555-9224"};

        for(int i = 0; i &lt; names.length; i++) {

        if(names[i].toLowerCase().contains(userSearch.toLowerCase())) {

            System.out.println(names[i] + ":  " + phone[i]);

            }
        }
    }
}
Structure
It surprises me that promptUser() also performs the search.  Amongst other things, this makes it harder for you to test the prompting, and it makes it harder to re-use the function for something else.
I would expect main() to look like this:
public static void main(String[] args)
{
    String search_string
         = promptUser(&quot;Enter a name or characters to search for: &quot;);
    searchAndDisplay(search_string);
}

We need to modify promptUser() to accept an argument and return a value:
public static String promptUser(String prompt) {
    Scanner keyboard = new Scanner(System.in);
    System.out.println(prompt);
    String userSearch = keyboard.nextLine();
    keyboard.close();
    return userSearch;
}

I hope you see how it has become more reusable.
Data structure
We would like to be able to separate the search and display parts of searchAndDisplay() (because one day, we'll want to search and update, or search and remove).  That's hampered at the moment because each record is scattered across two lists (and we have a weakness that the two lists need to be kept aligned with each other).
Instead, it will be easier to work with a single list of records.  Let's define a Record structure that looks something like:
public class Record
{
    String name;
    String phone;
}

Now, if we have a list of Record, we can have a search() function that returns a Record and a display() function that accepts a record and prints it.  I'll let you fill in the rest of Record - you'll want at least a constructor, and probably accessors and a bool matches(String substring).
String comparison
Comparing strings by converting both to lower case usually works for English names, but less well in other languages.  For example, it will prevent AMELIE from matching Amélie in French (where accents are not usually kept on upper-case words), and it will miss Groß when searching for GROSS.  There are a couple of Stack Overflow answers that address this (and probably better than my very rusty Java knowledge):

How to check if a String contains another String in a case insensitive manner in Java?
Case-insensitive storage and unicode compatibility

Beware that there are quite a few bad answers on those questions, mostly recommending toLower() or toUpper() as you have now.
You probably want something like
    Pattern search_re = Pattern.compile(userSearch, Pattern.CASE_INSENSITIVE | Pattern.LITERAL | Pattern.UNICODE_CASE);
    for (int i = 0;  i &lt; names.length;  i++) {
        if (p.matcher(name).find()) {
            System.out.println(names[i] + &quot;:  &quot; + phone[i]);
        }
    }

(where Pattern is java.util.regex.Pattern - you'll want to import that).
Obviously you'll need to adapt that a little once you're storing Record objects rather than separated names and phones.