Skip to content
Snippets Groups Projects
Select Git revision
  • cbd80d54fb5bea70a3b45d4acc7e9463dbac542a
  • main default protected
2 results

Book.java

Blame
  • Book.java 436 B
    class Book{
        String author;
        String title;
        int year;
    
        Book(String author, String title, int year){
            this.author = author;
            this.title = title;
            this.year = year;
        }
    
        public String toString(){
            return this.author + ";" + this.title + ";" + this.year;
        }
    
        boolean isOldest(Book book){
            if(this.year<book.year){
                return true;
            }
            return false;
        }
    }