Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Influxdb Database A Comprehensive Guide To Learn Influxdb Database

Authors: Cybellium Ltd ,Kris Hermans

1st Edition

B0CNGGWL7B, 979-8867766450

More Books

Students also viewed these Databases questions