About 50 results
Open links in new tab
  1. Syntax for creating a two-dimensional array in Java

    If you want to store n elements then the array index starts from zero and ends at n-1. Another way of creating a two dimensional array is by declaring the array first and then allotting memory for …

  2. Getting the array length of a 2D array in Java - Stack Overflow

    Also, if you accept a 2D array as input, e.g. in a constructor. You should check it and throw exceptions where applicable.

  3. Finding minimum and maximum in Java 2D array - Stack Overflow

    0 Your problem is: You are sorting the array of int arrays instead of sorting each individual int in each int array. To solve this: Loop through each int array in the array of int arrays. Instructions …

  4. Arrays.fill with multidimensional array in Java - Stack Overflow

    Aug 19, 2011 · 4 Multidimensional arrays are just arrays of arrays and doesn't check the type of the array and the value you pass in (this responsibility is upon the developer). Thus you can't …

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

    How can you pass 2D array as the argument when sort expects a 1D array? This didn't work for me.

  6. Sorting 2D array of strings in Java - Stack Overflow

    0 -Create list out of this array using Arrays.toList () -Design comparator using java.lang.comparator and write logic for sorting every even elements

  7. java - How to insert values in two dimensional array …

    May 25, 2012 · You can set values at specific array positions. If you know how to do it with one-dimensional arrays then you know how to do it with n-dimensional arrays: There are no n …

  8. How can I manipulate 2D arrays in Java? - Stack Overflow

    Oct 10, 2014 · 3 I've been studying for my upcoming Java exam, and i'm having a hard time wrapping my head around 2D arrays. I have the basics down, such as creating and initializing …

  9. how to create dynamic two dimensional array in java?

    Apr 25, 2010 · A nice generic way for implementing a sizable 2D array in Java. You must use Integer, though, as primitives cannot be keys of Treemap.

  10. Find the dimensions of a 2D array in java - Stack Overflow

    Apr 10, 2016 · I'm playing around with Arrays in Java and had this doubt. How do I find the dimensions of a 2D array in java? For example, I get an array input from System.in and pass it …