
String Methods in Java
Presentation
•
Computers
•
10th Grade
•
Medium
Lisa Donlan
Used 10+ times
FREE Resource
15 Slides • 10 Questions
1
2
3
4
5
Multiple Choice
What is the output?
String word1 = "Hello";
String word2 = "hello";
System.out.println(word1.equals(word2);
true
false
6
7
8
9
Multiple Choice
What is the output?
String word1 = "Day";
System.out.println(word1.length( ));
1
2
3
4
10
Multiple Choice
What is the output?
String word1 = "Day Old";
System.out.println(word1.length( ));
3
5
6
7
11
12
Multiple Choice
What is the output?
String word1 = "Happy Days";
System.out.println(word1.charAt(0);
D
H
Happy
Days
13
Multiple Choice
What is the output?
String word1 = "Happy Days";
System.out.println(word1.charAt(2);
H
a
p
y
14
15
16
17
Multiple Choice
What is the output?
String word1 = "Happy Days";
System.out.println(word1.substring(0,4);
Happy
Days
Hap
Happ
18
Multiple Choice
What is the output?
String word1 = "Happy Days";
System.out.println(word1.substring(4,9);
y Days
Day
Days
y Day
19
20
Multiple Choice
What is the ouput?
String word1 = "Hello";
String word2 = "hello";
System.out.println(word1.equals(word2);
System.out.println(word1.equalsIgnoreCase(word2);
true
true
true
false
false
true
false
false
21
String str = "class";
What does str.length( ) equal?
22
String str = "class";
What is the output?
23
Multiple Choice
What is the output?
String word1 = "stressful";
System.out.println(word1.substring(3));
essful
e
r
ressful
24
Overloading
substring(int) vs. substring(int, int)
This is an example of overloading. Java is smart enough to know that when you only use one integer, then give the rest of the string.
If you use two integers, then you are only getting part of the string.
25
Open Ended
What are 3 things you learned today?
Show answer
Auto Play
Slide 1 / 25
SLIDE
Similar Resources on Wayground
20 questions
Выполнение арифметических действий над элементами массива
Presentation
•
10th Grade
21 questions
Algoritma
Presentation
•
10th Grade
19 questions
2.2 Testing
Presentation
•
10th Grade
20 questions
Unit 6 Concept 2 Conservation of Energy
Presentation
•
10th Grade
19 questions
Arsitrektur dan Organisasi Komputer
Presentation
•
11th Grade
20 questions
Wave Unit Review
Presentation
•
11th Grade
20 questions
Algoritma & Flowchart | SMA Surya Buana Malang
Presentation
•
11th Grade
22 questions
Turtle: Combining subprograms & layers
Presentation
•
9th - 10th Grade
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade