Just want to know if its possible to initialize array at runtime?
Printable View
Just want to know if its possible to initialize array at runtime?
Yes.
Code:class Pseudo {
int[] sizes;
String[] ids = new String[0];
// somewhere later
sizes = new int[16];
ids = new String[4];
javaplus, this is the wrong forum for this post. "Java Tips" forum is not for asking questions. Please be more careful next time..