





























Teach students to visit, build, clean and line up text in Java. Students use a for loop with charAt(i) to visit each letter and += to build new text, and they fill a pass table on paper. Then, in our online code lab, they clean typed names with trim() and the case methods, swap dashes with replace() and line up a table of names and roles with String.format().
● Instant download · Lifetime access · Editable & print-ready
Short coding levels practice this lesson in CodeGrove, our code lab that runs in the browser. Students write the program, run it and check it, with no account and nothing to install. Use them with the lesson or as practice later.
See the levels→Students often call replace() and expect the String to change by itself. This lesson shows that a String can't change, so each method hands back new text. Students store that new text and use format codes with widths to line up a table.
The try-it on Day 1, the lab on Day 2 and the quiz task on Day 3 run online in CodeGrove, our in-browser code lab, so students need a computer or tablet on those days. The Name Tag Formatter level practices cleaning typed text with trim() and the case methods, swapping text with replace(), and lining up a table with String.format(). CodeGrove is free, with no accounts, sign-ins or installs.
Students clean typed names and roles and print a lined-up cast table in CodeGrove.
Students write the new text after each pass of the loop. They see how += adds one letter at a time.
Students give each column a width and pick left or right alignment. Their tables print in neat columns.
Every page is a print-ready PDF, and the Google Forms™ and Google Slides™ let you teach the same lesson in Google Classroom™.
Students write and run real Java in CodeGrove, our in-browser code lab, on a computer or tablet, with no accounts or installs.
Every day has its own answer key, and every written question has a sample answer and what to look for.
Each day's plan is timed activity by activity against real reading and writing speeds.
Reviews help me a lot, and they help other teachers pick the right resources for their classes. It takes about a minute.
Leave a reviewInstant download right after checkout: PowerPoint and Word files you can edit, print-ready PDFs, and links that copy the Google Forms™ and Google Slides™ into your Drive.
Yes. This lesson is part of the Unit 2 bundle and the complete Java Programming course. Both cost less than buying the lessons one at a time.
No. It is a full-year, non-AP Java course for grades 9 to 12, and it is not built for the AP exam. For AP, see our AP Computer Science A and AP CSP courses.
Students know loops over text in some programming language. In Java, they can read a string's letters with charAt, cut it with substring, and compare it with .equals().
Yes, on the CodeGrove days. Each student needs a computer or tablet that's online, and CodeGrove needs no account or install. The bell ringers, notes, exit tickets and quiz are on paper.
Every page is a print-ready PDF. The slides are an editable PowerPoint and the guided notes an editable Word file. The exit tickets and the quiz also come as Google Forms™, and the deck as Google Slides™.
Written for Florida's Advanced Programming course (9007230). The skills map in the lesson shows which standards each day teaches.