About 3,780,000 results
Open links in new tab
  1. How do I declare and initialize an array in Java? - Stack Overflow

    Jul 29, 2009 · This answer fails to properly address the question: "How do I declare and initialize an array in Java?" Other answers here show that it is simple to initialize float and int arrays …

  2. How do I fill arrays in Java? - Stack Overflow

    Feb 23, 2009 · I know how to do it normally, but I could swear that you could fill out out like a[0] = {0,0,0,0}; How do you do it that way? I did try Google, but I didn't get anything helpful.

  3. Syntax for creating a two-dimensional array in Java

    2 Actually Java doesn't have multi-dimensional array in mathematical sense. What Java has is just array of arrays, an array where each element is also an array. That is why the absolute …

  4. equals vs Arrays.equals in Java - Stack Overflow

    Jan 9, 2020 · When comparing arrays in Java, are there any differences between the following 2 statements? Object[] array1, array2; array1.equals(array2); Arrays.equals(array1, array2); And …

  5. Initialising a multidimensional array in Java - Stack Overflow

    Jul 1, 2009 · Java does not truely support multidimensional arrays. In Java, a two-dimensional array is simply an array of arrays, a three-dimensional array is an array of arrays of arrays, a …

  6. Finding the max/min value in an array of primitives using Java

    Sep 28, 2009 · Pass the array to a method that sorts it with Arrays.sort() so it only sorts the array the method is using then sets min to array[0] and max to array[array.length-1].

  7. 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 …

  8. arrays - length and length () in Java - Stack Overflow

    Dec 27, 2009 · In Java, an Array stores its length separately from the structure that actually holds the data. When you create an Array, you specify its length, and that becomes a defining …

  9. java - Make copy of an array - Stack Overflow

    Java Array Copy Methods Object.clone (): Object class provides clone () method and since array in java is also an Object, you can use this method to achieve full array copy.

  10. 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 …