Question: Given the following two classes in Java : * And these lines of code ( written in main class ) : * What
Given the following two classes in Java :


* And these lines of code ( written in " main class " ) :

* What would be the result / output ? explain ( **note : running these lines of code could also result in a compilation / or run-time error ).
public class AA private String strl; public AA )f this.strl"Hello" System.out.println ("in AA'S" + "constructor "stri) public String getstrl) f return strl; public void h) ( System.out.println("in AA's h") public void t) System.out.println ("in AA's f") public void g) System.out.println ("in AA's g"); public String tostring) f return strl
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
