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
Arrays in C++ - CS172- Exercise #2

Flashcard
•
University
11 questions
Computer Programming

Flashcard
•
University
15 questions
Binomial Distribution

Flashcard
•
KG - Professional Dev...
14 questions
Java Flashcard I

Flashcard
•
University
9 questions
Estatuto da Criança e do Adolescente

Flashcard
•
Professional Development
18 questions
JavaScript Variables, Data Types, and Operators Flashcard

Flashcard
•
University
17 questions
AP CSA Unit 3 Review

Flashcard
•
12th Grade
11 questions
TOC_Q1

Flashcard
•
Professional Development
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
11 questions
All about me

Quiz
•
Professional Development
10 questions
How to Email your Teacher

Quiz
•
Professional Development
5 questions
Setting goals for the year

Quiz
•
Professional Development
14 questions
Disney Trivia

Quiz
•
Professional Development
14 questions
2019 Logos

Quiz
•
Professional Development
7 questions
How to Email your Teacher

Quiz
•
Professional Development
11 questions
NFL Football logos

Quiz
•
KG - Professional Dev...
20 questions
Employability Skills

Quiz
•
Professional Development