Hej,
Proszę o wsparcie, a mianowicie chciałbym zwrócić w metodzie public static Book of()
obiekt Book, tak aby title
i author
były polami.
public class Book {
private String author (String author) {
author = ("Isaac Asimov");
return author;
}
private String title(String title) {
title = ("The Galaxy");
return title;
}
public String new Book(){
Book book = new Book(title, author);
}
public static Book of(String title, String author) {
return new Book(title, author);
System.out.println(new Book);
}
}