Java String & Math Class Review

Flashcard
•
Computers
•
9th - 12th Grade
•
Hard
Wayground Content
FREE Resource
Student preview

38 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Is String a primitive data type?
Back
No
2.
FLASHCARD QUESTION
Front
Which method to use to find length of a String?
Back
length()
3.
FLASHCARD QUESTION
Front
Which data type gets returned from length() method in String class?
Back
int
4.
FLASHCARD QUESTION
Front
What is the correct way to find the length of "txt" string? Options: int len = length(txt);, float len = txt.length();, int len = txt.length();, double len = length(txt);
Back
int len = txt.length();
5.
FLASHCARD QUESTION
Front
String txt = "Hello World";
System.out.println(txt.toUpperCase());
Choose the correct output.
Back
HELLO WORLD
6.
FLASHCARD QUESTION
Front
Choose correct purpose of indexOf() in String class.
Back
returns the index (the position) of the first occurrence of a specified text in a string (including whitespace)
7.
FLASHCARD QUESTION
Front
What is the output of the following code?
String firstName = "John ";
String lastName = "Doe";
System.out.println(firstName.concat(lastName));
Back
John Doe
Create a free account and access millions of resources
Similar Resources on Wayground
29 questions
AP CSA Unit 3 Boolean Expressions

Flashcard
•
10th - 12th Grade
30 questions
Java Data Types Flashcard - Marvel

Flashcard
•
9th - 12th Grade
30 questions
AP CSA Unit 2 Review

Flashcard
•
10th - 12th Grade
36 questions
AP CS A Midterm Review

Flashcard
•
9th - 12th Grade
35 questions
Project-Stem Python Final Exam

Flashcard
•
9th - 12th Grade
32 questions
Programming Logic Pre-Assessment

Flashcard
•
9th - 12th Grade
40 questions
AP Computer Science A Final Review

Flashcard
•
10th Grade - University
30 questions
Java Math and Misc (WU for VC 4)

Flashcard
•
10th - 12th Grade
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
10 questions
Afterschool Activities & Sports

Quiz
•
6th - 8th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
15 questions
Cool Tool:Chromebook

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
20 questions
Bullying

Quiz
•
7th Grade
18 questions
7SS - 30a - Budgeting

Quiz
•
6th - 8th Grade