Java: Using the String.substring() Method
Teacher-led notes
Today Mr. Cusack will explain how to use the Java substring() method.
Purpose:
• Learn how to extract letters from a String using substring() from the Java String class.
Reminder:
• Come up to the board if you have your prior assignment done.
Materials:
• Computer
Expected Output:
• Your output should show up in the Eclipse Console.
Assignment: Practice substring() in Eclipse
Goal: Gain an understanding of the String class substring() method.
Purpose:
• Use Eclipse to program using Java
• Code the program shown in the reference image
• Show Mr. Cusack your output
Your files will be:
• PX_SubstrJLC_lastname.java (Java program)
• PX_SubstrJLC_lastname.png (Screenshot)
• PX_SubstrJLC_lastname.mp4 (Video of you running your program)
Turn In:
• Drop off all 3 files into Google Classroom.
Materials:
• Computer
Expected Output:
• Your output should show up in the Eclipse Console.
If you do not understand this assignment:
• Ask Mr. Cusack in class and/or come to tutorials.