About 50 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 …

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

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

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

    Convert String into a two dimensional array Asked 10 years, 10 months ago Modified 8 years, 1 month ago Viewed 28k times

  5. 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, 4 months ago Modified 11 years, 4 months ago Viewed 15k times

  6. java - storing a string and int in 2d array - Stack Overflow

    Sep 27, 2014 · This was an exercise on understanding 2d arrays. i know different data types aren't possible in a single array. The requirement was creating an object with a 2d array. one …

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

    The sort method delegates to the comparator to determine if one element of the array must be considered bigger, smaller or equal to another element. Since every element of the outer array …

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

    29 I want to do something like this ArrayList<String<String>> mylist How can I create it? How can I add to the external and internal list and how can I convert the internal list to a simple array list?

  9. Making a mixed 2D array in java - Stack Overflow

    Jun 25, 2013 · You could do it if you do a 2D array of Object as in Object[][] myArray = new Object[x][y] where x and y are numbers. All you would have to do is cast the Objects to their …

  10. java - Need some explanation on 2D String arrays - Stack Overflow

    Nov 14, 2012 · The first for iterates over the array of five String arrays, that's why i goes from 0 to 4 and the array's length is 5. The second for iterates over the indexes of the String[] objects …