Skip to content

Commit 0b28258

Browse files
committed
Chapter11
1 parent 54d200a commit 0b28258

20 files changed

Lines changed: 989 additions & 42 deletions

ch06/.idea/workspace.xml

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ch07/.idea/workspace.xml

Lines changed: 60 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ch09/.idea/workspace.xml

Lines changed: 57 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ch09/StringUtil.java

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ public static void main(String[] args)
3434
//HOW DO I GET/PRINT THE INDEX??? 9-B-6
3535
String printCharacters = getprintCharacters("Hello");
3636

37+
printPhoneNumber("501-555-0100");
38+
39+
3740
}
3841

3942

@@ -77,22 +80,25 @@ private static String getprintCharacters(String value)
7780
return value;
7881
}
7982

80-
private static void printPhoneNumber(String area, String exchange, String line)
83+
private static void printPhoneNumber(String phoneNumber)
8184
{
82-
String phoneNumber = area.substring(0,3) + exchange.substring(3,6) + line.substring (6,9);
83-
System.out.print("Phone Number is" + area);
85+
String areaCode = phoneNumber.substring(0,3);
86+
String exchange = phoneNumber.substring(4,7);
87+
String lineNumber = phoneNumber.substring(8,12);
88+
System.out.println("Area Code: " + areaCode + " Exchange: " + exchange + " Line Number: " + lineNumber);
8489
}
90+
}
91+
8592

8693

87-
//private static String findFirstE ("Hello")
94+
//private static void String (findFirstE)
8895
//{
89-
// return int index = value.indexOf('e');
96+
//return int index = value.indexOf('e');
9097
//}
9198

9299
//private static String isFinn (String value)
93100

94101
//if name1=="Finn"
95102
//{
96103
//return = true;
97-
//}}
98-
}
104+
//}}

ch10/.idea/misc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ch10/.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ch10/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)