I have been trying to create an output for an array list of API books using JSON object and this array code gives a hint not a statement. Below is the block of code in Java using Android Studio
Book book = new Book {
bookJSON.getString(ID),
volumeInfoJSON.getString(TITLE),
(volumeInfoJSON.isNull(SUBTITLE)?"":volumeInfoJSON.getString(SUBTITLE)),
authors, volumeInfoJSON.getString(PUBLISHER),
volumeInfoJSON.getString(PUBLISHED_DATE);
books.add(book);
}
}