1 parent 4611e4e commit 0fd2bbaCopy full SHA for 0fd2bba
1 file changed
ch09/Exercise9F.java
@@ -0,0 +1,14 @@
1
+public class Exercise9F
2
+{
3
+ public static void main(String[] args)
4
+ {
5
+ printPhoneNumber("501-555-0100");
6
+ }
7
+
8
+ private static void printPhoneNumber (String digits)
9
10
+ System.out.println("Area Code: " + digits.substring(0,3));
11
+ System.out.println("Exchange: " + digits.substring(4,7));
12
+ System.out.println("Line Number: " + digits.substring(8,12));
13
14
+}
0 commit comments