• Post Reply Bookmark Topic Watch Topic
  • New Topic

Array constructor  RSS feed

 
Kirill Yunussov
Greenhorn
Posts: 2
Chrome Java MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Exactly what code runs when you initialize an array as follows? I tried to see in debug but it doesn't go into the array's constructor. Just curious what it looks like.






 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16057
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Arrays are a built-in feature of Java. There's really no code to jump into - in fact, there's a single bytecode instruction for creating an array (the bytecode instruction "anewarray").

There is no constructor for arrays.
 
Kirill Yunussov
Greenhorn
Posts: 2
Chrome Java MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
great, thank you
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!