set length of a java array

Status
Not open for further replies.

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
is there any way shorter than this:

Code:
 private Date today = new Date();
    private Date[] createdAt =  {today,today,today,today,today,today,today,today,today,today,today,today,today,today,today,today,today,today,today,today};

if I want 20 indexes?

This will obviously don't work if I need an array with 200+ indexes etc

PS. Yes, I was at the java channel, they only posted a tutorial that said nothing at all about it, then ignored me
 
Status
Not open for further replies.
Top