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
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
English,
3 months ago
English,
3 months ago
Science,
3 months ago
Computer Science,
6 months ago
Chemistry,
6 months ago
Psychology,
11 months ago