About 4,510,000 results
Open links in new tab
  1. How to make an array of arrays in Java - Stack Overflow

    Arrays are cumbersome, in most cases you are better off using the Collection API. With Collections, you can add and remove elements and there are specialized Collections for …

  2. What's the simplest way to print a Java array? - Stack Overflow

    Arrays.toString As a direct answer, the solution provided by several, including @Esko, using the Arrays.toString and Arrays.deepToString methods, is simply the best. Java 8 - Stream.collect …

  3. How to use java.util.Arrays - Stack Overflow

    I think what you are trying to ask is how to use Arrays in java. In which case you don't import java.util.Arrays, you use the array syntax.

  4. Comparing two integer arrays in Java - Stack Overflow

    I am trying to write code to compare two arrays. In the first array I have put my own digits, but the second the array takes numbers from the input file. The size of this array is determined by the...

  5. java - How to split an array into smaller chunk arrays? - Stack …

    37 You can use Arrays.copyOfRange(int[] original, int from, int to) The code could be something like this:

  6. Converting array to list in Java - Stack Overflow

    How do I convert an array to a list in Java? I used the Arrays.asList() but the behavior (and signature) somehow changed from Java SE 1.4.2 (docs now in archive) to 8 and most …

  7. How can I create a generic array in Java? - Stack Overflow

    In Java 8, we can do a kind of generic array creation using a lambda or method reference. This is similar to the reflective approach (which passes a Class), but here we aren't using reflection.

  8. How to convert an Array to a Set in Java - Stack Overflow

    I would like to convert an array to a Set in Java. There are some obvious ways of doing this (i.e. with a loop) but I would like something a bit neater, something like: java.util.Arrays.asList(Obj...

  9. java Arrays.sort 2d array - Stack Overflow

    java Arrays.sort 2d array Asked 12 years, 8 months ago Modified 7 months ago Viewed 371k times

  10. java - Comparing arrays in JUnit assertions, concise built-in way ...

    Is there a concise, built-in way to do equals assertions on two like-typed arrays in JUnit? By default (at least in JUnit 4) it seems to do an instance compare on the array object itself. EG, …