Strings and Characters, Errors and Debugging

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/18

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:12 PM on 9/28/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

19 Terms

1
New cards

String index

The numbered position of a character. the first character is at index 0

2
New cards

.length()

returns the number of characters in a String

3
New cards

.charAt(index)

returns the character at the specified index

4
New cards

.substring(start)

returns the part of a String beginning at start and continuing at the end

5
New cards

.substring(start, end)

returns characters beginning at start and stopping before end

6
New cards

.equals()

compares the contents of two Strings

7
New cards

String comparision

Use .equal() to check whether two Strings contain the same characters

8
New cards

ASCII

A system that represents characters using numeric values

9
New cards

Character and ASCII relationship

each character is connected to a number, allowing characters to be compared or used in calculations

10
New cards

valid String indexes

The indexes go from 0 through length() - 1

11
New cards

Last character

found using s.charAt(s.length() - 1)

12
New cards

Empty string

A String containing no characters ""

13
New cards

Syntax error

code that violates Java's rules and cannot compile

14
New cards

logical error

code that compiles and runs but produces the wrong result

15
New cards

debugging

finding and correcting errors in code

16
New cards

compile-time error

an error discovered when the compiler attempts to translate the source code

17
New cards

Tracing for debugging

following code one statement at a time while recording variable values and output

18
New cards

off by one error

using an index or loop boundary that is one position too high or too low

19
New cards

String index error

trying to use an index outside 0 through length() -1