Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Exercise.O4Exersice;
- public class Article {
- private String title;
- private String content;
- private String author;
- public Article(String title, String content, String author) {
- this.title = title;
- this.content = content;
- this.author = author;
- }
- public String getTitle() {
- return title;
- }
- public String getContent() {
- return content;
- }
- public String getAuthor() {
- return author;
- }
- @Override
- public String toString() {
- return String.format("%s - %s: %s", title, content, author);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment