
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
Operations on Functions
Presentation
•
10th - 11th Grade
18 questions
String Method
Presentation
•
10th Grade
21 questions
Higher Assignment - Testing & Evaluation (DDD)
Presentation
•
10th Grade
22 questions
GCSE COMP 1 Unit 3 Sound
Presentation
•
10th Grade
20 questions
While & Do While Loop
Presentation
•
11th Grade
23 questions
Lección Robot Soccer
Presentation
•
10th Grade
20 questions
Output devices
Presentation
•
9th Grade
Popular Resources on Wayground
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
6 questions
Rule of Law
Quiz
•
6th - 12th Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
10 questions
Movie Trivia
Quiz
•
KG - 2nd Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade
Discover more resources for Computers
16 questions
Module 1 Topic 2 Vocabulary Test
Quiz
•
9th - 12th Grade
10 questions
Navigating Digital Citizenship and Online Safety
Interactive video
•
6th - 10th Grade
18 questions
[AP CSP] Python Coding: Conditionals + List + Algo Dev
Quiz
•
9th - 12th Grade
20 questions
Early Computing
Quiz
•
7th - 12th Grade