collections tag

14 questions


1 answers
123 views
0
Can I change List to int[]?

I'm learning Java. Can I change the list to int[]? There is a method called List.toArray(), but the return data type is Object[]. I want to get an Integer[] or an int[] What should I do?Right now, I'm...

2 years ago

1 answers
139 views
0
Can you change the array to Set more easily?

I want to change the array to Set in Java. java.util.Arrays.asList(Object[] a); I can use asList, but I want to find a cleaner way.

2 years ago

1 answers
101 views
0
What is the best way to filter a Java collection?

I want to filter java.util.Collection when implementing.

2 years ago

1 answers
120 views
0
How do I copy an ArrayList?

How do I copy ArrayList in Java 1.5?ArrayList<Dog> dogs = getDogs();ArrayList<Dog> clonedList = ...Copy each item of dogs...For example, if I want to copy dogs to the clonedList like this,...

« - 2 -

© 2024 OneMinuteCode. All rights reserved.