collections tag

14 questions


1 answers
399 views
0
I have a question regarding the use of java library when doing a coté.

Hi, everyone. Can I use any library when I coat with java?For example, if you have a problem with sorting, use Arrays.sort()Use Map = new TreeMap<>(Collections.reversOrder())). Is this not a pro...


1 answers
94 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
168 views
0
How do I initialize HashMap myself?

Map<String,String> test = new HashMap<String, String>{test:test,test:test};Is there a way to initialize HashMap like the code above? Is the code above grammatically correct?


1 answers
160 views
0
Why is there no get(int index) in java.util.Set?

I understand that there is no get method in Set for a reason, but please explain the reason.I think it's good to put elements in the set, but I don't know a good way to get a single item from there.So...


1 answers
166 views
0
Can't we do it in reverse order when we repeat from Java to ether?

When you want to search for an array in reverse order, just turn it into a for statement, for (int i = nodes.size() - 1; i >= 0; i--) { final Node each = (Node) nodes.get(i); ... }You can do it lik...

2 years ago

1 answers
89 views
0
I want to put int[] in the List , how do I do it?

I want to put int[] in the list, how do I do it?


1 answers
86 views
0
I want to convert the String to ArrayList, and I want to add a comma part

Is there any method created in Java that separates the string into an array or list by comma?Or do I have to make the code myself?


1 answers
91 views
0
How do I create a list in Java?

Set is Set myset = new HashSet()You make it like this, right? How do I make a list?

2 years ago

1 answers
89 views
0
How do I erase repeating elements from the ArrayList?

There is a string ArrayList, but I want to erase the repeated string from this list. What should I do?


1 answers
157 views
0
Can we do the order of ArrayList randomly?

There are two ArrayLists, filelist and imgList. If each of these is H1.txt, it's related to e1.jpg.When I change the order of the imgList automatically, I want to change the order according to the fil...

- 1 - »

© 2024 OneMinuteCode. All rights reserved.