1
Answer

how to create an array element that store multiple data types

krishna balla

krishna balla

18y
2.2k
1

I want to create an array element that store multiple data types, for example

I'm using Object[] mult_type = new Object[4];

How can I go about to do that in storing different type of objects and
retrieve
 the objects back into it's original states?

data type index
 String 0
 int 1
 long 2
 short 3

Answers (1)