• Post Reply Bookmark Topic Watch Topic
  • New Topic

Autofill  RSS feed

 
Aditya Nair
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey, how do you use the autofill method with arrays??
Thnx
[ December 04, 2006: Message edited by: Aditya Nair ]
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch!

The "fill" method in java.util.Arrays is heavily overloaded to work in a variety of ways. What exactly are you trying to do?

Note that...
  • The class is in java.util, so you will need an import statement.
  • The class is "Arrays" (with an 's' at the end). This is a utility class to be used with arrays. It is not the array itself.
  • The fill method is static, so you call it from the class Arrays, and you pass your array as a parameter.
  •  
    Don't get me started about those stupid light bulbs.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!