APCSA Unit 2 Review

Flashcard
•
Computers
•
Professional Development
•
Hard
Wayground Content
FREE Resource
Student preview

18 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Which data type gets returned from length() method in String class?
Back
int
2.
FLASHCARD QUESTION
Front
What is the correct way to find the length of the string "txt"? Options: int len = length(txt);, float len = txt.length();, int len = txt.length();, double len = length(txt);
Back
int len = txt.length();
3.
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)
4.
FLASHCARD QUESTION
Front
What is the output of the following?
String x = "10";
String y = "20";
String z = x + y;
System.out.println(z);
Back
1020
5.
FLASHCARD QUESTION
Front
What is the return type of equals() method?
Back
boolean
6.
FLASHCARD QUESTION
Front
What is the most appropriate way to check if two Strings are identical? Options: string1 == string2, string1.equals(string2), string1.same(string2), string1.equalsIgnorecase(string2)
Back
string1.equals(string2)
7.
FLASHCARD QUESTION
Front
When you try to square root a negative number in Java, what happens?
Back
It returns the value NaN
Create a free account and access millions of resources
Similar Resources on Wayground
16 questions
Consumer Math: 5-1 & 5-2 Notecard Check-In

Flashcard
•
12th Grade
15 questions
Lesson 3: Making Change

Flashcard
•
12th Grade
15 questions
Java String and Array

Flashcard
•
Professional Development
15 questions
Multiplication Facts of 10

Flashcard
•
KG
7 questions
Grades 3-5 NJSLA Math Assessment Flashcard

Flashcard
•
Professional Development
20 questions
ACT TEST

Flashcard
•
Professional Development
15 questions
The easiest flashcard

Flashcard
•
KG
18 questions
gnbf

Flashcard
•
KG
Popular Resources on Wayground
10 questions
Video Games

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

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade