Christianson

Quiz
•
Computers
•
11th Grade
•
Medium

Mr. Christianson
Used 20+ times
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Assume you have the following array: int[] a = {1,2,3,4,5}; How would you increment the fourth element in the array by one?
3++;
4++;
a[2]++;
a[3]++;
a[4]++;
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What does the String method indexOf() do?
Returns the location of a certain character in the String object.
Tests two String objects for equality.
Compares this String with a secondString for greater than, equal to or less than
Returns the character at a certain location.
Returns the length of a String.
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following code:
String str = "Computer Science";
Which of the following statements correctly prints the last character in the String str?
System.out.println(str.charAt(0));
System.out.println(str.charAt(1));
System.out.println(str.charAt(str.length()));
System.out.println(str.charAt(str.length() - 1 ));
. System.out.println(str.charAt(str.length() + 1 ));
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following Strings:
s1 = "PH";
s2 = "ph";
s3 = "Patrick Henry";
Given that P comes before p in dictionary order, which of the following is true?
s1.compareTo(s2) < 0 && s2.compareTo(s3) < 0
s2.compareTo(s1) < 0 || s3.compareTo(s1) < 0
s3.compareTo(s1) < 0 && s1.compareTo(s2) < 0
! (s1.equals(s2) && s3.compareTo(s2) < 0)
s1.compareTo(s2) <= 0 && s2.compareTo(s3) < 0
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The index of the last element of an array is ______.
.size
.length
.length - 1
.size - 1
.length()
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following code:
if(s.toLowerCase().equals(s.toUpperCase()) System.out.println("*");
Tests if the String s contains only non-letter characters.
Tests if the String s contains Only upper-case letters.
Tests if the String s contains only digits.
Tests if the String s contains Only lower-case letters.
None of the above
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following can be stored in a standard array?
ints
Strings
boolean
doubles
All of the above
Create a free account and access millions of resources
Similar Resources on Wayground
35 questions
PAS PRODAS KELAS XI

Quiz
•
11th Grade
25 questions
python 3-5 unit 10gr

Quiz
•
10th Grade - University
25 questions
Python lesson 3 (Tkinter)

Quiz
•
6th - 12th Grade
25 questions
PLTW CSE Quiz - Activities 1.1.1 thru 1.1.3

Quiz
•
9th - 12th Grade
25 questions
Java Programming Quizz-GX

Quiz
•
9th - 12th Grade
25 questions
Java Review

Quiz
•
9th Grade - University
25 questions
C++ cilci

Quiz
•
9th - 12th Grade
31 questions
Map 1

Quiz
•
6th Grade - University
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade