Interviews5 answers
Can you insert different datatypes in an array
5 Answers
Yes , you can use ArrayList for this.
for example
ArrayList arryList1 = new ArrayList();
arryList1.Add(1);
arryList1.Add("Two");
arryList1.Add(3);
arryList1.Add(4.5);
Uzma KhanPosted Oct 1, 2018, 3:52 AM EDT
yes you can with ArrayList
Rushyanth ReddyPosted Aug 22, 2018, 1:52 AM EDT
You can use ArrayList to have array with multiple data types. This is deprecated though, you can use generic list List which uses less memory and stable.
Krunal LokhandePosted Aug 18, 2018, 9:30 AM EDT
No
Shiva MogilicharlaPosted May 25, 2018, 5:12 AM EDT
yes
by the use of object array
object[] arr=new object[10];
Mukesh KumarPosted Aug 21, 2017, 7:40 AM EDT
