toString method I don't know how to use it and what the purpose
<p>this the frist class:</p>

<pre><code>public class Book {



public int n1,n2,g1,g2;
    public boolean lamp=false;
    public int isbn;
    public String author,title,genre;


    public void  generateReference(){


        char n1=author.charAt(0);
        char n2=author.charAt(1);
        char g1=genre.charAt(0);
        char g2=genre.charAt(1);
        System.out.print(n1+""+n2+"-"+g1+""+g2);

    }

    public boolean verifyisbn(int x){
        isbn=x;

        int d1=isbn%10;
         isbn=isbn/10;
        int d2=isbn%10;
        isbn=isbn/10;
        int d3=isbn%10;
        isbn=isbn/10;
         int d4=isbn%10;

        int sum=(d4*3+d3*2+d2*1)%4;
        if(sum==d1){

            return true;

        }
        return false;

    }


     public String toString(){

        return n1+""+n2+""+g1+""+g2+""+author+""+isbn+""+title+""+genre;








    }

}
</code></pre>

<p>=====</p>

<p>here it is where I should create objects and print the information that has been entered from user </p>

<pre><code>import java.util.Scanner;
public class TestBook {

    public static void main(String[] args) {

        Scanner input =new Scanner(System.in);
        Book b1=new Book();
        System.out.println("Please, entre the book details #ISBN, author,title, and genre.");
        boolean a=b1.verifyisbn(b1.isbn=input.nextInt());
        if(a==true){
            b1.author=input.next();
            b1.title=input.next();
            b1.genre=input.next();
            System.out.println("Title: "+b1.title);
            System.out.println("Author: "+b1.author);
            System.out.println("ISBN: "+b1.isbn+" - "+"Reference Code :"+b1.n1+""+b1.n2+""+b1.g1+""+b1.g2);
            System.out.println("Genre: "+b1.genre);
            b1.generateReference();

        } else {
            System.out.print("Invalid ISBN ");
        }
    }

}
</code></pre>

<p>But the problem that I have is that the numbers are 00000</p>

<p>How could I let them print?</p>