About 50 results
Open links in new tab
  1. java - Ragged and Jagged Arrays - Stack Overflow

    Aug 16, 2013 · What is the difference between ragged and jagged arrays? As per my research both have the same definitions, i.e. two-dimensional arrays with different column lengths.

  2. 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 when they …

  3. How do I create a jagged 2d array in Java? - Stack Overflow

    Apr 22, 2012 · 9 Our homework assignment asks us to use a jagged array to store the values of a two dimensional boolean matrix. Is there a built in java class for the jagged array or am I going to have to …

  4. How to create a ragged array in Java - Stack Overflow

    Dec 13, 2015 · I wanna create a ragged array (two-dimensional array) that the user inserts the values one at a time. I would usually create them like so: int[][] array = {{1,2,3}, {6,7}} but I don't know their …

  5. java - How to iterate over each element in a jagged array ... - Stack ...

    How to iterate over each element in a jagged array? Asked 9 years, 2 months ago Modified 4 years, 4 months ago Viewed 5k times

  6. Is there a more efficient way to reverse the rows of a ragged 2D array ...

    Jan 23, 2024 · 0 I wrote a method that flips the rows of a ragged java array, however this involves 4 different for loops, with two of them being nested loops. Is there a better, more efficient way to tackle …

  7. java - Checking to see if a 2d array is jagged - Stack Overflow

    Apr 10, 2021 · Condition 1 is self-evident by virtue of a int[][] declaration. Conditions 2 and 3 necessitate one for loop - because you do not need to iterate through the array that contains the potentially …

  8. java - How do I populate a "ragged" array with values of a text file ...

    Jun 8, 2011 · So, for example, Row 1 would hold the state populations of Region 1 resulting in 6 columns, Row 2 represents Region 2 resulting in 7 columns, and so on resulting in a "ragged" array. …

  9. java - 2D Array (Ragged) - Print Each Column Sum - Stack Overflow

    Feb 12, 2015 · 2D Array (Ragged) - Print Each Column Sum Asked 10 years, 11 months ago Modified 10 years, 7 months ago Viewed 3k times

  10. java - How would you iterate through a 2D array by going down …

    Dec 3, 2022 · How would you iterate through a 2D array by going down through columns? I want this for a ragged array but seeing in a regular array first might work Asked 3 years, 2 months ago Modified 3 …