Post Reply 
Instantiating an Array of Custom Class
Author Message
Assassinator
...

Posts: 6,646.6190
Threads: 176
Joined: 24th Apr 2007
Reputation: 8.53695
E-Pigs: 140.8363
Offline
Post: #3
RE: Instantiating an Array of Custom Class
(10/09/2012 04:09 PM)Slushba132 Wrote:  So today I learned that when you instantiate an array of a custom class (in C# and Java)

Code:
customClass[] customClasses = new CustomClass[4];


you actually create an array of null references to this class. The class doesn't automatically initialize. And personally, I think THAT IS SO DAMN DUMB...
WHO THE FUCK NEEDS AN ARRAY OF NULL REFERENCES
WHY DON'T THEY JUST AUTO INSTANTIATE?


Stop bitching, it's not like it's hard to do it yourself.

Also, what if your class can't initiate without arguments? Wouldn't work man.
10/09/2012 05:20 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Instantiating an Array of Custom Class - Assassinator - 10/09/2012 05:20 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: