Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

instantiation


  • Please log in to reply
2 replies to this topic

#1 BioHazard90

BioHazard90

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Local time:01:52 PM

Posted 15 January 2009 - 09:13 PM

class MyProgram
{
	static void Main()
	{
		int[] integers;			// declare array
		integers = new int[10];	// size array
	}
}

In which line is the array actually instantiated?

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:12:52 PM

Posted 15 January 2009 - 10:25 PM

This is a declaration: int[] integers;

This is an initialization: integers = new int[10];

Together, they make an instance. At least, that is how I understand it.

#3 Guest_Jay-P VIP_*

Guest_Jay-P VIP_*

  • Guests
  • OFFLINE
  •  

Posted 15 January 2009 - 10:37 PM

Instantiation is an Object. It is declared by an integer.

Work on your deep versus shallow object copies, and you will know. :thumbsup:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users