
Chapter 6 Exam
Authored by Sundi Tiller
Computers
9th - 12th Grade
Used 8+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements about ASCII and Unicode are true?
ASCII is a newer version of Unicode
ASCII is used to represent characters in many languages, while Unicode can only describe a single language
Strings formed from Unicode characters will always take less memory than strings formed from ASCII characters
ASCII uses a single byte to represent 128 English characters, while Unicode uses multiples bytes to represent thousands of characters in many languages
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following conditions would make it impossible for two strings to be considered equal by the String equals() method?
The two strings have the same number of characters, and match exactly, except the capitalization is different.
All of these are true
The two strings have a different number of characters
The two strings have the same number of characters but the contents are different
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following expressions (1, 2, 3, 4) will produce a true result when the input and password string variables contain exactly the same characters?
1. input.equals(password)
2. password.equals(input)
3. input == password
4. password == input
All will produce true
1 and 2 only
1 and 3 only
3 and 4 only
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A user logs in by entering a username and password. If you want to compare the username to a known string value, and don't want capitalization differences to matter, which String method should you use?
equalsIgnoreCase()
compareCase()
compare()
equals()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following expressions should be used to determine if the contents of myString1 are equal to the contents of myString2?
myString1 = myString2
myString2.equals(myString1)
myString1 == myString2
They all work equally well
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A user logs in by entering a username and password. If you want to compare the password to a known string value, and must have an exact match (including capitalization) for a true result, how should you compare those strings?
Use the == equality operator
Use the String equals() method
Use the String equalsIgnoreCase() method
All of these will work
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given the following three string variables, which expression will return true?
String myString1 = "not so loud!";
String myString2 = "NOT SO LOUD!";
String myString3 = "No thanks";
myString3.equalsIgnoreCase("NO THANKS")
They all return true
myString1.equalsIgnoreCase(myString2)
myString2.equalsIgnoreCase(myString1)
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
16 questions
C-Programming Basics
Quiz
•
12th Grade
21 questions
Y9 Creative iMedia RO81 Quiz Part 1
Quiz
•
9th Grade
20 questions
Microsoft Excel
Quiz
•
KG - Professional Dev...
17 questions
Basic Docs
Quiz
•
8th - 9th Grade
20 questions
CSS 10 - QUIZ
Quiz
•
10th Grade
20 questions
Yr 11 ICT quiz 1 Networks & Security
Quiz
•
10th - 11th Grade
20 questions
CSS GRADE 9 - QUIZ PECs and EM
Quiz
•
9th Grade
15 questions
CIW
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade