What mistake is in the following code?
AP CS A Quiz 5 PRACTICE

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Scott Chamberlain
Used 5+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
It should say return true
The return value should be cast to a double
The parameter should be a double type
A method whose return type is void cannot return a value
In a return statement, calculations cannot be done
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider a method defined with the header shown here.
Which of the following method calls is NOT legal?
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
When you pass an int variable to a method, the method receives ______.
a copy of the memory address
the reference of the variable
the length of the variable
a copy of the variable
binary of the memory address
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following method.
Which of the following methods produce the same results?
I only
II only
III only
I and II
I, II, and III
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following is NOT a way Java tells overloaded methods apart?
the return type
the number of parameters
the type of parameters
the order of parameters
All these items can be used to tell overloaded methods apart
6.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Given the following code, what is output by the method call, mystery(7, 5)?
A
B
C
D
nothing is printed - there is an error
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following method which makes use of the edhesive.shapes.Circle class.
What is printed when the following code in the main method is executed?
2 2
2 6
6 2
6 6
nothing is printed, an error occurs
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
String and Math Methods AP CSA

Quiz
•
10th Grade
15 questions
Unit 8 - Searching and Sorting

Quiz
•
9th - 12th Grade
10 questions
Advanced Java Study Guide

Quiz
•
11th - 12th Grade
14 questions
PYTHON DICTIONARIES

Quiz
•
11th Grade
10 questions
System Life Cycle

Quiz
•
10th - 11th Grade
10 questions
Study Guide - More Advanced Java

Quiz
•
11th - 12th Grade
14 questions
Java HashMap Quiz

Quiz
•
11th Grade
13 questions
Intro to Python Final

Quiz
•
9th - 12th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Computers
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Identify Slope and y-intercept (from equation)

Quiz
•
8th - 9th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
26 questions
June 19th

Quiz
•
4th - 9th Grade
20 questions
Distance, Midpoint, and Slope

Quiz
•
10th Grade
20 questions
Figurative Language Review

Quiz
•
10th Grade
27 questions
STAAR English 1 Review

Quiz
•
9th Grade