
Unit 5 Demo Test
Authored by Fatema B
Computers
11th Grade
Used 23+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
2 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Consider the following class definition.
The following code segment appears in a class other than SomeClass.
SomeClass first = new SomeClass(10);
SomeClass second = new SomeClass(20);
SomeClass third = new SomeClass(30);
first.incrementY();
second.incrementY(10);
System.out.println(third.getY());
What is printed as a result of executing the code segment if the code segment is the first use of a SomeClass object?
0
1
11
14
30
2.
MULTIPLE SELECT QUESTION
3 mins • 1 pt
Consider the following partial class declaration. Select all the variables that we can access but not modify in other classes.
myA
myB
myC
None of the above.
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?