in Python by
Q:
Which of the following statements is correct in this python code?

class Name:  

    def __init__(javatpoint):  

        javajavatpoint = java  

name1=Name("ABC")  

name2=name1  

i)  It will throw the error as multiple references to the same object is not possible

ii)  id(name1) and id(name2) will have same value

iii)  Both name1 and name2 will have reference to two different objects of class Name

iv)  All of the above

1 Answer

0 votes
by

ii)  id(name1) and id(name2) will have same value

Click here to read more about Python
Click here to read more about Insurance

Related questions

0 votes
asked Jan 13 in Python by SakshiSharma
0 votes
asked Jun 24, 2020 in Python by Robindeniel
+1 vote
asked Jan 19 in Python by SakshiSharma
0 votes
asked May 11, 2020 in Testing by SakshiSharma
0 votes
asked Jan 29, 2020 in Azure by Tate
...