This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I guess that what you want is retrieve multiple records from the database, and store the results in an array.
An array is not the best suited collection to do this, because arrays in Java have a fixed size, which is set at the moment you create an array, and here you don't know in advance how many records you are going to retrieve from the database.
So instead of an array, it would be better to use a collection class such as ArrayList, which can grow dynamically. To put the results of the query in an ArrayList of User objects, you could do something like this: