in Technology by

What do you mean by nameless objects?

a) An object created by using the new keyword.

b) An object of a superclass created in the subclass.

c) An object without having any name but having a reference.

d) An object that has no reference.

🔗Reference: stackoverflow.com

🔗Source: Java Interview Questions and Answers

1 Answer

0 votes
by

(d) An object that has no reference.

Explanation: The nameless objects are basically referred to as anonymous objects. The anonymous objects do not have any names. We can also say that, when an object is initialized but is not assigned to any reference variable, it is called an anonymous object. For example, new Employee();.

If we assign it to a reference variable like,

Employee emp = new Employee();

In the above code, emp is a reference variable. Therefore, the above object is not anonymous, as it is assigned to a reference variable.

Hence, the correct answer is option (d).

Related questions

0 votes
    What do you mean by value types and reference types in C#?...
asked Jul 27, 2021 in Technology by JackTerrance
0 votes
    What do you mean by Domain driven design?...
asked Jul 24, 2021 in Technology by JackTerrance
0 votes
    What do you mean by admin in WebLogic?...
asked Jun 10, 2021 in Technology by JackTerrance
0 votes
    What do you mean by column family in Cassandra?...
asked Apr 15, 2021 in Technology by JackTerrance
0 votes
    What do you mean by commit log in Cassandra?...
asked Apr 15, 2021 in Technology by JackTerrance
0 votes
    What do you mean by data center in Cassandra?...
asked Apr 15, 2021 in Technology by JackTerrance
0 votes
    What do you mean by the Outline agreement?...
asked Mar 15, 2021 in Technology by JackTerrance
0 votes
    What do you mean by contracts in MM?...
asked Mar 15, 2021 in Technology by JackTerrance
0 votes
    What do you mean by consumption-based planning (CBP)?...
asked Mar 14, 2021 in Technology by JackTerrance
0 votes
    What do you mean by material requirement planning (MRP)?...
asked Mar 14, 2021 in Technology by JackTerrance
0 votes
    What do you mean by Interoperability of Web Services?...
asked Mar 13, 2021 in Technology by JackTerrance
0 votes
    What do you mean by cognitive solutions?...
asked Feb 22, 2021 in Technology by JackTerrance
0 votes
    What do you mean by the term synchronization in the repository?...
asked Feb 21, 2021 in Technology by JackTerrance
0 votes
    What do you mean by Tag in SVN?...
asked Feb 21, 2021 in Technology by JackTerrance
0 votes
    What do you mean by the term Branch in the Subversion?...
asked Feb 18, 2021 in Technology by JackTerrance
...