Computer Science, asked by mannaelizabethj, 6 months ago

Write a program in Java to accept 10 names in a Single Dimensional Array and display all those names whose first alphabet matches with the alphabet given by the user.

It is really important plzz give it fast best ans will be marked brainliest​

Answers

Answered by krishbharati17
2

Answer:

That's where I am upto now:

package costomersearching;

import java.util.ArrayList;

import java.util.Scanner;

public class CostomerSearching {

public static void main(String[] args) {

ArrayList<String> customerName = new ArrayList();

Scanner input = new Scanner(System.in);

customerName.add("Sara");

customerName.add("John");

customerName.add("Miami");

customerName.add("Mart");

customerName.add("Alex");

System.out.println("Customer List: \n" + customerName);

System.out.println("Search Customer by letter: ");

String letter = input.next();

//show the name containg the letter starting as the first letter

//Show the name containing the letetr.

}

Similar questions