please use the line numbers in the images below: Question 10 After the program r
ID: 3708822 • Letter: P
Question
please use the line numbers in the images below:
Question 10
After the program returns to line 7 in Circle2Test.java in the proceeding question, the program execution then proceeds to line 8. Line 8 is also a method invocation. It is an invocation to printCircleInParameter. Please enter the line number of the header of the method definition for this method in Circle2.java?
_____________
Is printCircleInParameter a static method? Please type yes or no in the blank below.
____________
Is any other method in Circle2 a static method?
___________
Method printCircleInParameter has a parameter c. What's assigned to c when the method is invoked this time?
___________
What's printed by the method invocation?
_____________
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
(A) 20
It is defined in Line 20 in class Circle.
(B) Yes
The static keyword is mentioned in the method definiiton. Hence, the method is static.
(C) second
second is passed as argument when the method is invoked. Hence, the value of c is assigned to second.
(D) Radius is 10
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.