Jan 18 in Python
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
Jan 18

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
Jan 13 in Python
...