Код: Выделить всё
public class Book extends TextObject{
// Private variables initialised here
// Basic Constructor
public Book(String authorLastName, String authorFirstName, String textName,
String isbn, String publisher, short publishYear,
String category, char availability){
this.authorLastName = authorLastName;
// etc.
< /code>
-затем, из нового пакета: < /p>
package AddText;
public class AddBook {
public static Book addBook() {
// ... various code irrelevant to post...
Book newBook = new Book(newAuthorLastName, newAuthorFirstName,
newTextName, newIsbn, newPublisher, newPublishYear,
newCategory, 'A');
return newBook;
Подробнее здесь: https://stackoverflow.com/questions/795 ... he-package