please use the line numbers in the images below: Question 7 This is a continuati
ID: 3708815 • Letter: P
Question
please use the line numbers in the images below:
Question 7
This is a continuation of the proceeding question. On line 13 of Circle2.java, newRadius is assigned toradius. Remember that radius is a abbreviation of this.radius. The variable this is an implicit parameter and it refers to the current object that the method is invoked on. There are two objects created so far, one is referred to by variable first in the main method and the other is referred to by variable second in the main method.
Remember that the current method invocation is from line 6 of Circle2Test.java. Please enter in the blank below whether variable this is assigned to variable first or variable second? (Please type either first or second in the blank below.)
________________
Just before line 13 is executed, what is the value of this.radius?
__________
After line 13 is executed, what is the value of this.radius?
____________
After the method invocation returns, what happens to the frame where all local variables are located? Please type either deallocated or kept in memoryin the blank below.
___________
After the method invocation returns, which line does the program return to in Circle2Test,java? Please type the line number in the blank below.
______________
1 public class Circle2Test 2public static void main (String[ args) I Circle2 first - new Circle2 (5) Circle2 second - new Circle2 (10) first.setRadius (20) second.setRadius (100) first.printCircle Circle2.printCircleInParameter (second); 10Explanation / Answer
Remember that the current method invocation is from line 6 of Circle2Test.java. Please enter in the blank below whether variable this is assigned to variable first or variable second? (Please type either first or second in the blank below.)
_______second_________
Explanation: lINE 6 IS FOR SECOND
Just before line 13 is executed, what is the value of this.radius?
______for the first object the value is 5____
______for the second object the value is 10____
After line 13 is executed, what is the value of this.radius?
______for the first object the became 20____
______for the second object the became 100____
Answer: deallocated
Answer: After the method invocation returns the program return to next line
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.