It returns some type coversion error sayign can’t convert Shape to Share when you write “Share circle1 = circle;”
Interviews14 answers
Shape circle = new Shape(); Share circle1 = circle; circle = null? what will be the value of circle1?
14 Answers
Shashidhar ReddyPosted Aug 4, 2019, 6:57 AM EDT
circle1 is the instantiated value of shape and wont be null
Ramkumar KandappanPosted Apr 11, 2019, 6:24 PM EDT
null
Chandrakant SabnavisPosted Feb 9, 2019, 5:27 AM EST
circle
Amit PrakashPosted Jan 1, 2019, 8:51 PM EST
null
CharuPosted Jan 1, 2019, 7:51 PM EST
Original value of circle
Hosam KhanjarPosted Nov 29, 2018, 7:21 PM EST
5
Hosam KhanjarPosted Nov 29, 2018, 7:20 PM EST
Original value of circle
Hosam KhanjarPosted Nov 29, 2018, 7:19 PM EST
Null
Hosam KhanjarPosted Nov 29, 2018, 7:18 PM EST
circle1 will reference to Shape object initially referenced by circle
Siddhesh ChalkePosted Oct 29, 2018, 8:58 AM EDT
Sorry for the confusion.
It is Shape = circle1 = circle; and not Share;
The answer will be circle1 will have value, since both are referring the same address from different stack location. The location of circle is assigned to null and not the circle1.
Vijayashankar PalanichamyPosted Oct 17, 2018, 4:01 AM EDT
circle will contain Shape object
Sachin SuryawanshiPosted Oct 17, 2018, 2:44 AM EDT
Share circle1 = circle;
Shape and Share is different
Sachin SuryawanshiPosted Oct 17, 2018, 2:40 AM EDT
null.
Smith SonuPosted Sep 30, 2018, 1:17 AM EDT

