package com.twu.biblioteca;

import java.util.ArrayList;
import java.util.List;

public class Books {
    private List<String[]> books;

    public Books() {
        books = new ArrayList<>();
        books.add(new String[]{"Harry Potter and The Sorcer's Stone", "JK Rowling", "1999"});
        books.add(new String[]{"Harry Potter and The Chamber of Secrets", "JK Rowling", "2000"});
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        for (String[] bookDetails : books) {
            sb.append("| ");
            for(String bookDetail : bookDetails) {
                sb.append(bookDetail).append(" | ");
            }
            sb.deleteCharAt(sb.length() - 1);
            sb.append("\n");
        }
        sb.deleteCharAt(sb.length() - 1);
        return sb.toString();
    }
}
@@ -112,24 +112,20 @@
 te List%3C
-String%5B%5D
+Book
 %3E books;
@@ -200,33 +200,29 @@
 oks.add(new 
-String%5B%5D%7B
+Book(
 %22Harry Potte
@@ -266,15 +266,13 @@
 g%22, 
-%22
 1999
-%22%7D
+)
 );%0A 
@@ -296,17 +296,13 @@
 new 
-String%5B%5D%7B
+Book(
 %22Har
@@ -358,15 +358,13 @@
 g%22, 
-%22
 2000
-%22%7D
+)
 );%0A 
@@ -477,117 +477,25 @@
  for
- (String%5B%5D bookDetails : books) %7B%0A            sb.append(%22%7C %22);%0A            for(String bookDetail
+(Book book
  : book
-Detail
 s) %7B
@@ -499,36 +499,32 @@
 ) %7B%0A            
-    
 sb.append(bookDe
@@ -525,105 +525,9 @@
 book
-Detail).append(%22 %7C %22);%0A            %7D%0A            sb.deleteCharAt(sb.length() - 1);%0A            sb
+)
 .app

Change List of String[] to List of Book