How can I declare an array of byte arrays with a limited size for the array? This is what I was thinking but it’s not working and I couldn’t find anything.
private Integer number =10000;
private byte[] data[];
data = new byte[][number];
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Something like this?
This creates an array of arrays. However, none of those sub-arrays yet exist. You can create them thus:
(or in a loop, obviously).
Alternatively, if they’re all the same length, you can do the whole thing in one hit: