I have two arrays , data in first array is predefined and data in second array is coming from the data base (data which user want to add ). How i can do this ?
- 5 years ago
String fruit[] = { "Apple", "Bannana", "Ice" }; String hitech[] = { "Bike", "Car", "Mobile" }; List list = new ArrayList(Arrays.asList(hitech)); list.addAll(Arrays.asList(fruit)); Object[] myArray = list.toArray(); System.out.println("@@@@@@@@@@@@@@@@@@@"+Arrays.toString(myArray));
- 5 years ago
String fruit[] = { "Apple", "Bannana", "Ice" }; String hitech[] = { "Bike", "Car", "Mobile" }; List list = new ArrayList(Arrays.asList(hitech)); list.addAll(Arrays.asList(fruit)); Object[] myArray = list.toArray(); System.out.println("@@@@@@@@@@@@@@@@@@@"+Arrays.toString(myArray));
Hot Questions