Download presentation
Presentation is loading. Please wait.
Published byMorris Mason Modified over 8 years ago
1
IB103 Week 3 String Arrays & Processing Chapter 15
2
String Arrays An example: String cities[] = new String[10]; // array of strings cities[0] = “London”;
3
Enter data, save and display
4
String parameters (p289) Rewrite doubleIt so that it works and demonstrate it (p290) private void doubleIt (String any) { // should be what? any = any + any; // should be what? Because a String parameter is unchanged
5
Mobile Phone Case Study 3 Case Study (Continued) Apply the array data structure to the mobile phone to create a 'phone book'. Tasks 3.1 Amend the mobile phone program so that up to 5 mobile phone numbers can be stored and displayed.
6
Chapter Example Program AskFraiser See Author’s web site, run program after study of code Discuss new features
7
A note on StringTokenizer class Beyond scope of this module Used for advanced string manipulation Uses delimiters for, eg Transforming file data: “Peter, Chalk, 2394, tb1/1” Is called ‘comma delimited’ A StringTokenizer can split up data between commas – see p287
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.