Question: 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
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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
