12345678910111213141516171819202122232425262728293031323334353637 |
- import java.util.*;
- /**
- * Created by leon on 1/23/18.
- */
- public class PhoneBook {
- private String phoneNumber;
- private String name;
-
- private Map<String,String> input = new TreeMap<String,String>();
-
- public static void main(String [] args){
-
- }
-
- public PhoneBook(){
- this.input = new TreeMap<String, String>();
- }
-
- public void display(){
- if(this.input.containsKey(name)){
- for(Map.Entry<String,String> input: input.entrySet()){
-
- String value = input.getValue();
- String key = input.getKey();
- }
-
- }
- }
-
- public void remove(String name){
- this.input.remove(name);
- }
-
- public void AddInput(String name,String phoneNumber){
- this.input.put(name,phoneNumber);
- }
- }
|