Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please do it step by step to show how to get the final output instead of using Java to run the whole program! Please also
Please do it step by step to show how to get the final output instead of using Java to run the whole program! Please also who me which line need to comment out and why 9) CLASSES Q: a) Comment out the line of code with the compile-time error b) What gets printed after error is fixed #1? in 1 class Age 2 3 4 public void add (int y) year +- y; > 5 public void sub (Age a)( year *= private int year = 3; a.year -3; 6 ublic int getold() return +tyear; 9 public class Ageless 10 11 public static void main( String args) 12 13 14 15 16 17 18 Age menew Age ); Age it new Age(); me.add 2); //me.year--; it.sub(me); System.out.println( me.getold) + ""it.getold; 19> 20
Please do it step by step to show how to get the final output instead of using Java to run the whole program! Please also who me which line need to comment out and why
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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