About 594,000 results
Open links in new tab
  1. 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 …

  2. java - convert two-dimensional array to string - Stack Overflow

    Mar 25, 2013 · for(String[] a : tableBornes) System.out.println(Arrays.toString(a)); The above code will print every array in two dimensional array tableBornes in newline.

  3. How to initialize a 2D array of strings in java - Stack Overflow

    Oct 14, 2014 · How to initialize a 2D array of strings in java Asked 11 years, 1 month ago Modified 11 years, 1 month ago Viewed 15k times

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

  5. Initialising a multidimensional array in Java - Stack Overflow

    Jul 1, 2009 · String[][] myStringArray = new String [x][y]; is the correct way to initialise a rectangular multidimensional array. If you want it to be jagged (each sub-array potentially has a different length) …

  6. How to print two dimensional array of strings as String

    I know how to do the toString method for one dimensional arrays of strings, but how do I print a two dimensional array? With 1D I do it this way: public String toString() { StringBuffer result...

  7. java - How do I declare a 2D String arraylist? - Stack Overflow

    12 The first array list isn't an array list of String, it's an ArrayList of ArrayList.

  8. java - Iterate through 2 dimensional array - Stack Overflow

    Sep 12, 2014 · In the second block (the one you want), the inner loop iterates over all the columns before moving to the next row. tl;dr: Essentially, the for() loops in both functions are switched. That's …

  9. java - Convert String into a two dimensional array - Stack Overflow

    Assuming that the input string will always be in that format, with 4 integers between each bracket, I think the best way to do it would simply be to use a Scanner object and it's nextInt () method which will …

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