Q:

SHowing null and 0 in my display method

here's my code and it's showing null and "0" in my display method,The problem is that "obj.display();" is showing null or 0 and I dont know what is wrong with it help please I have an exam on wed and I have been practicing these concepts and cant seem to solve this one 
Class
public class Books {

    private String nameOfBook;
    private  String author;
    private int pages;
    private int pubYear;//year publish
    private int isbn;

    public Books() {

    }

    public Books(String nameOfBook,String author,  int pages,  int pubYear, int isbn) {

        this.nameOfBook = nameOfBook;
        this.pages = pages;
        this.author = author;
        this.pubYear = pubYear;
        this.isbn = isbn;
    }

    public String getNameOfBook() {
        return nameOfBook;
    }

    public void setNameOfBook(String nameOfBook) {
        this.nameOfBook = nameOfBook;
    }

    public int getPages() {
        return pages;
    }

    public void setPages(int pages) {
        this.pages = pages;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getPubYear() {
        return pubYear;
    }

    public void setPubYear(int pubYear) {
        this.pubYear = pubYear;
    }

    public int getIsbn() {
        return isbn;
    }

    public void setIsbn(int isbn) {
        this.isbn = isbn;
    }

    public void display(){
        System.out.println("Book's Name: "+getNameOfBook());
        System.out.println("Pages: "+getPages());
        System.out.println("Author's Name: "+getAuthor());
        System.out.println("Year: "+getPubYear());
        System.out.println("ISBN: "+getIsbn());

    }
}

Main method
import java.util.Scanner;

public class BookDriver {

    public static void main (String [] args){

        Scanner input= new Scanner(System.in);
        System.out.println("Enter the Book's Name: ");
        String nameOfBooks = input.nextLine();
        System.out.println("Enter the author's Name: ");
        String author = input.nextLine();
        System.out.println("Enter Number of pages: ");
        int pages = input.nextInt();
        System.out.println("Enter the publish year: ");
        int pubYear = input.nextInt();
        System.out.println("Enter the ISBN: ");
        int isbn =input.nextInt();
        Books obj= new Books();
        obj.display();
    }
}

A:

Your constructor here is empty 
    Books obj= new Books();

you should pass the correct parameters so the display works 
likethis 
  Books obj= new Books(nameOfBooks,author,pages, pubYear ,isbn   );

