Code HS
“Errors and Exceptions”
Find the Bug!
Code HS
“Errors and Exceptions”
Find the Bug!

HINT for the last one in “Strings and Characters”
Character is a class in the Javadoc.
Character.isDigit(c) is a method that will return true if c is a digit, false if it is not.
So for our program, we can use a loop to get:
char c = str.charAt(i);
if Character.isDigit(c)
….
else
…

CodeHS Methods Units 1,2

PLEASE SEE SCHOOL LOOP FOR REVIEW WORKSHEETS EMBEDDED IN THE CALENDAR FOR THURSDAY UNDER “MIDTERM EXAM”
Exam on Basic Java concepts:
Escape character: \n, \t, \\, \”
Math: %, 1, math.sqrt(), Math.random() etc
if/else
loops: for and while
Strings: substring, .equals, length() etc.
boolean logic: &&, ||, DeMorgan’s law
I’ve included the worksheets we’ve done WITH ANSWERS to help you study 🙂
Do the first lab in Boolean Logic Two. Try the Challenge if you want 🙂
Do both labs in Boolean Logic
While and do-While Labs Day 1 in the Sandbox
Do the first 4.
last one is a challenge!