0 votes
in Python by
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

Related questions

0 votes
asked Jan 13, 2021 in Python by SakshiSharma
0 votes
asked Jun 24, 2020 in Python by Robindeniel
...