• Post Reply Bookmark Topic Watch Topic
  • New Topic

Array of Objects  RSS feed

 
Raman Ghai
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my code :



Is there any shortcut to initialize the liner without writing that for loop ?
 
Rob Spoor
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope. There is a utility method in java.util.Arrays to fill an array, but that would add the same instance multiple times.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!