JAVA string

Quiz
•
Computers
•
12th Grade
•
Hard
Wayground Content
Used 26+ times
FREE Resource
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data type gets returned from length() method in String class?
double
String
int
number
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
String txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
What is the correct way to find the length of "txt" string?
int len = length(txt);
float len = txt.length();
int len = txt.length();
double len = length(txt);
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is correct method to convert String into uppercase
changeUpperCase()
convertUpperCase()
toUpper()
toUpperCase()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is word.charAt(7) ?
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is word.length()?
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method to use to find length of a string?
length()
size()
long()
count()
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Choose correct purpose of indexOf() in String class.
returns the index (the position) of the last occurrence of a specified text in a string
returns the character of the first occurrence of a specified character in a string
returns the index (the position) of the first occurrence of a specified text in a string (excluding whitespace)
returns the index (the position) of the first occurrence of a specified text in a string (including whitespace)
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
Binary files in Python

Quiz
•
12th Grade
14 questions
Файловые системы

Quiz
•
7th Grade - University
15 questions
2D Arrays

Quiz
•
9th - 12th Grade
15 questions
Exploring Python Fundamentals

Quiz
•
12th Grade - University
19 questions
Unit 5 - Two-Dimensional Arrays

Quiz
•
9th - 12th Grade
15 questions
Python Lists

Quiz
•
8th - 12th Grade
20 questions
Java Objects - Medium Practice Quiz

Quiz
•
12th Grade
16 questions
Lists

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade