arraylist tag

23 questions


1 answers
148 views
0
To create an ArrayList from an array

I will Element[] array = {new Element(1), new Element(2), new Element(3)};I initialized this arrangement ArrayList<Element> arraylist = ???;How do I put it in here?

2 years ago

1 answers
93 views
0
What's the way to initialize a line in ArrayList?

ArrayList<String> places = new ArrayList<String>(); places.add(Buenos Aires); places.add(Córdoba); places.add(La Plata);For example, there is a source like this, and I want to reduce the i...


1 answers
188 views
0
How do I get the last value of ArrayList?

I don't know what the last value of ArrayList is. How do I get the last value of ArrayList?

2 years ago

1 answers
183 views
0
What do you compare the contents() method of ArrayList?

ArrayList<Thing> basket = new ArrayList<Thing>(); Thing thing = new Thing(100); basket.add(thing); Thing another = new Thing(100); basket.contains(another); // true or false?class Thing { ...


1 answers
90 views
0
How to replace an Integer ArrayList with an int array

To replace the Integer type ArrayList with an int type array List<Integer> x = new ArrayList<Integer>();int[] n = (int[])x.toArray(int[x.size()]);I did this, but there is a compilation err...


1 answers
109 views
0
To remove elements with all null values from an ArrayList or String array

I'd like to remove all elements that have null values from the ArrayList or String array in JavaFor me,for (Tourist t : tourists) { if (t != null) { t.setId(idForm); } }I tried turning around the ...


1 answers
123 views
0
Java: How to read a text file

You want to read a text file with a space character delimited value. What should I do? And how do you store that read value in an array list?For example, of the text file data .1 62 4 55 5 6 77I'd lik...


1 answers
146 views
0
[java] I don't know how to put an array in an array list.

I want to know how to put an array in the Java arrayList. [] The square brackets are arraylist {} Braces are arrays[{array 0, array 1, array2} {array 0, array 1, array2}...{array0,array1,array2}] I wa...

2 years ago

1 answers
154 views
0
There is a problem reloading the saved Checkbox value.

Hello. I'm developing an Android app, and after selecting a check box in the Listview in my app, I need to put a specific text in the ArrayList and save that part, and then turn it back on using the s...


1 answers
151 views
0
Output the xml file screen stored on the Android List

I'm making an alarm app using Android.Receiving multiple alarms from users was implemented, but the problem was caused by trying to display the set alarms on the screen.Normally, when we set multiple ...

- 1 - »

© 2024 OneMinuteCode. All rights reserved.