Can anybody please expalin me the following program as how I am getting the output.The progem is running correctly but I need an explanation as I am cofused with passing an object reference. How v.i=15?
On line 37 (in the method second), v.i = 15 because v is a reference to the object created on line 35, which has an i value of 15.
On line 26 (in the method first), v.i = 20 because v is a reference to the object created on line 23
Note that the two vs are different -- they are references with the same name that reference the same object, but they are different references. You would get the same results (an things mightl be a little clearer) if the method second were written as:
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.