#Array that creates arrays
6 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @crystal whale! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Well, I'm not going to do your homework for you, but I'll show you how I might accomplish this in the D programming language, and you can adapt it to java:
void main() {
auto arr = [4, 3, 1];
int[][] arrays = [];
foreach (len; arr) {
arrays ~= new int[len];
}
}