title: Formatting: String cannot be converted to String[]
body: <blockquote>
    <p>Using the data array, create instances of books and store them in a one-dimensional array of <code>Book</code>, called <code>bookArray</code>. Using the quantity array, walk through the book array and calculate the total charge per book sold. Print in a dialog box the book title, the book isbn, and the total charge for each book. Then, print the grand total of all books sold.</p>
  </blockquote>
  
  <p>So far I have done this, but I'm having issue with the <code>JOptionPane</code> and formatting. </p>
  
  <p>Error</p>
  
  <pre><code>$ javac BookTest.java
  BookTest.java:41: error: incompatible types: String cannot be converted to String[][]
          dataArray +=String.format(" %s, %s ", b.getTitle(), b.getIsbn());
                                   ^
  1 error
  </code></pre>
  
  <p>And the code:</p>
  
  <pre><code>import javax.swing.JOptionPane;
  
  public class BookTest { 
     public static void main(String args[]) {
        String dataArray  [][]=
           {{ "Fiction", "Abraham Lincoln Vampire Hunter", "Grahame-Smith", "Wiley", "NY", "978-0446563079", "13.99", "222"},
            {"Fiction", "Frankenstein", "Shelley", "Prescott", "GA", "978-0486282114", "7.99", "321"},
            {"NonFiction", "Life of Kennedy", "Jones", "Pearson", "MT", "758-29304566", "12.90", "biography"},
            {"Fiction", "Dracula", "Stoker", "Addison", "CA", "978-0486411095","5.99", "145"},
            {"Fiction", "Curse of the Wolfman", "Hageman", "Wesley", "MA", "B00381AKHG", "10.59", "876"},
            {"NonFiction", "How to Pass Java", "Willis", "Wiley"," NY", "444-395869790", "1.99", "technology"},
            {"Fiction", "The Mummy", "Rice", "Addision", "CA", "978-0345369949", "7.99", "954"},
            {"NonFiction", "History of Texas", "Smith", "Prescott", "CA", "123-683947687", "9.75", "history"}
           };
  
        Book bookArray[] = new Book [8];
  
        for (int i = 0; i &lt; bookArray.length; i++) {
           if (dataArray[i][0].equals("Fiction")) {
              Publisher p = new Publisher(dataArray[i][3], dataArray[i][4]);
              bookArray[i] = new Fiction(dataArray[i][1], dataArray[i][2], dataArray[i][5],
                 p, Double.parseDouble(dataArray[i][6]), dataArray[i][7]);
           } else {
              Publisher p = new Publisher(dataArray[i][3], dataArray[i][4]);
              bookArray[i] = new NonFiction(dataArray[i][1], dataArray[i][2], dataArray[i][5],
                 p, Double.parseDouble(dataArray[i][6]), dataArray[i][7]);
           }
        }
  
        for (Book b:bookArray) {
          dataArray +=String.format(" %s, %s ", b.getTitle(), b.getIsbn());
          JOptionPane.showMessageDialog(null, dataArray);     
        }
     }        
  }
  </code></pre>