How many objects and reference variables are created, by following - ProProfs Discuss
Advertisement

How many objects and reference variables are created, by following code?

Thing item, stuff; item = new Object(); Thing entity = new Object();

Asked by Kalloorkar_bvk, Last updated: Mar 29, 2024

+ Answer
Request
Question menu
Vote up Vote down

1 Answer

John Smith

John Smith

John Smith
John Smith

Answered May 30, 2017

Two objects created.
Three reference variables created.
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.