1/18
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
String index
The numbered position of a character. the first character is at index 0
.length()
returns the number of characters in a String
.charAt(index)
returns the character at the specified index
.substring(start)
returns the part of a String beginning at start and continuing at the end
.substring(start, end)
returns characters beginning at start and stopping before end
.equals()
compares the contents of two Strings
String comparision
Use .equal() to check whether two Strings contain the same characters
ASCII
A system that represents characters using numeric values
Character and ASCII relationship
each character is connected to a number, allowing characters to be compared or used in calculations
valid String indexes
The indexes go from 0 through length() - 1
Last character
found using s.charAt(s.length() - 1)
Empty string
A String containing no characters ""
Syntax error
code that violates Java's rules and cannot compile
logical error
code that compiles and runs but produces the wrong result
debugging
finding and correcting errors in code
compile-time error
an error discovered when the compiler attempts to translate the source code
Tracing for debugging
following code one statement at a time while recording variable values and output
off by one error
using an index or loop boundary that is one position too high or too low
String index error
trying to use an index outside 0 through length() -1