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 it by …

  2. 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 for finding the …

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

  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 fill a …

  5. The best way to print a Java 2D array? - Stack Overflow

    5 From Oracle Offical Java 8 Doc: public static String deepToString(Object[] a) Returns a string representation of the "deep contents" of the specified array. If the array contains other arrays as …

  6. java - How to insert values in two dimensional array programmatically ...

    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 …

  7. 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 a 2D array, but …

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

    Apr 25, 2010 · Does Java have a C++ equivalent vector class where you can dynamically add rows & columns (without having to write your own..)? There are no multi-dimensional arrays in Java, there …

  9. java - Create a two dimensional string array anArray [2] [2] - Stack ...

    Dec 3, 2013 · Create a two dimensional string array anArray[2][2]. Assign values to the 2d array containing any Country and associated colour. Example: France Blue Ireland Green Output the …

  10. Index of 2D array in java - Stack Overflow

    Mar 6, 2015 · Index of 2D array in java Asked 13 years, 11 months ago Modified 4 years, 5 months ago Viewed 47k times