IDS 201 - Characters and Strings

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

10 Terms

1
New cards

What is char?

char = character (single letter, 16-bit).


๐Ÿ‘‰ Example: char c = 'A';.

2
New cards

What number is 'A'?

'A' = 65 in Unicode.


๐Ÿ‘‰ Example: char c = 65; // 'A'.

3
New cards

What is String?

String = text (object).


๐Ÿ‘‰ Example: String s = "Hello";.

4
New cards

Can Strings be changed?

No, Strings are immutable (cannot change directly).


๐Ÿ‘‰ Example: "Hi" + "!" makes a new String.

5
New cards

First letter of "Hello"?

'H'


๐Ÿ‘‰ Example: "Hello".charAt(0) = 'H'.

6
New cards

How many letters in "Hello"?

A: 5.


๐Ÿ‘‰ Example: "Hello".length() = 5

7
New cards

"Hello".substring(0,3) = ?

"Hel".

8
New cards

"5" + "5" = ?

"55".

9
New cards

How turn "123" into number

Integer.parseInt("123").

10
New cards

What does Scanner .nextLine() do?

Reads a whole line of text.


๐Ÿ‘‰ Example: User types: I like Java.