You can do it like this:
private Object[] myObjects = new Object[5];
Change the type as needed.
More Related Contents:
- How does array work? How to create a basic array data structure using java? [closed]
- Why is my array still NULL
- Difference between Object[] and Array of specific Objects in java
- Does Java JIT compiler sacrifice performance to favor Collections?
- How can I convert List to int[] in Java? [duplicate]
- Array initialization syntax when not in a declaration
- What is the default initialization of an array in Java?
- “Code too large” compilation error in Java
- how to parse JSONArray in android
- Resize an Array while keeping current elements in Java?
- java Arrays.sort 2d array
- Java count occurrence of each item in an array
- How to convert an Array to a Set in Java
- What is the diamond operator in Java? [duplicate]
- Java, find intersection of two arrays
- Dealing with an ArrayStoreException
- Java: Finding the highest value in an array
- Passing directly an array initializer to a method parameter doesn’t work
- Find an array inside another larger array
- how to write an array to a file Java
- Java: Reading integers from a file into an array
- Sort ArrayList of Array in Java
- Arrays.asList() of an array
- Convert a 2D array index into a 1D index
- Interview question – Search in sorted array X for index i such that X[i] = i
- Convert byte[] to Base64 string for data URI
- Java Iterate Bits in Byte Array
- How to convert JSONArray to List with Gson?
- In Java, when is the {a,b,c,…} array shorthand inappropriate, and why?
- Array with UserType in Hibernate and PostgreSQL –> MappingException