Answered step by step
Verified Expert Solution
Question
1 Approved Answer
public class Circle { private int raduis; private int first; private static int M=0; Find output: public Circle () { raduis=1; first=2; M+=raduis;} public
public class Circle { private int raduis; private int first; private static int M=0; Find output: public Circle () { raduis=1; first=2; M+=raduis;} public Circle (int r) 1 raduis =r; first-r+2; M+=raduis; } public void setData (int r) (raduis=r; M+=raduis;} public int getRaduis() (return(raduis);} public int getfirst() (return first;} public int getFirst(int m) (return (first+raduisim);} public static int getM() (return M;); } public class circle Demo { public static void main(String[] args) { } } Circle one= new Circle(); one.setData(3); int x =one.getfirst(); Circle two new Circle (x); System.out.println(one.getM());
Step by Step Solution
★★★★★
3.52 Rating (159 Votes )
There are 3 Steps involved in it
Step: 1
It will print 6Lets understand step by step each line step 1 we are creating new object and calling ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started