Parcourir la source

Update 'README.md'

nhu313 il y a 6 ans
Parent
révision
1697cad159
1 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 5
    3
      README.md

+ 5
- 3
README.md Voir le fichier

@@ -35,8 +35,8 @@
35 35
 
36 36
 	* `reverseLookup(String phoneNumber)`
37 37
 		* returns a name for the respective input `phoneNumber`
38
-	* `display()`
39
-		* print a human-readable list of all entries (names and phone numbers) in alphabetical order.
38
+	* `toString()`
39
+		* return a human-readable list of all entries (names and phone numbers) in alphabetical order.
40 40
 
41 41
 	   * Sample Script
42 42
 	
@@ -44,7 +44,9 @@
44 44
 		   PhoneBook phoneBook = new PhoneBook();
45 45
 		   phoneBook.add("Zebra", "111-222-333");
46 46
 		   phoneBook.add("Dog", "222-444-4444");
47
-		   phoneBook.display(); 
47
+		   
48
+           String entries = phoneBook.toString(); 
49
+           System.out.println(entries);
48 50
 		   ```
49 51
 	
50 52
 	   * Sample Output