- 1
How create a array object?
java
2 Answers
+ 2
// declaration of an array of integers
int[ ] anArray;
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html
first link of google "java array" search, first example ^^... to be continued by:
"Similary, you can declare arrays of other types: byte, short, long, float, double, boolean, char, String.
You can also place the brackets after the array's name:
// this form is discouraged
float anArrayOfFloats[ ];
"
Now, if you want to know how to create an array OF objects, your question is very badly asked :P
But google search adding "object" to the previous research may help you:
http://www.javawithus.com/tutorial/array-of-objects
http://stackoverflow.com/questions/5364278/creating-an-array-of-objects-in-java
+ 1
Thanks a lot