Question: I need help writing the following java Java Method below. I just need a method to take a user inputted First or Last Name and

I need help writing the following java Java Method below. I just need a method to take a user inputted First or Last Name and return the associated phone number, thank you!

import java.util.*; import java.io.*;

class PhoneList {

public static void main(String[] args) throws Exception { boolean loop = true; File file = new File("PhoneList_Data.txt"); FileWriter fw = new FileWriter(file, true); fw.write("PhoneList Data"); fw.write(" " + "Last, First: 6041337567, 2181731566"); // do { } (loop) fw.close(); }

// Method left needing to be written void display(String name) {}; // Display: Given a First or Last Name, display every PhoneNumber associated with that Name

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!