title: java programming exercise debug program
body: <p>I want to say thank you for reviewing my post and any contributions to my problem i am having. I am fairly new to java so i was wondering if you guys could please help me debug this program. </p>
  
  <pre><code>import java.util.Scanner;
  
  public class DebugExercise {
  
      public static void main(String[] args) {
          Scanner input = new Scanner(System.in);
          String area, inStr;
          int pages;
  
          System.out.println("Please enter your city");
          area = input.nextLine();
  
          System.out.println("Please enter page number " + area + "'s phone book");
          pages = input.nextInt();
  
          PhoneBook phoneBook = new PhoneBook(area, pages);
          phoneBook.display();
      }
  }
  
  class PhoneBook extends Book {
  
      private String area;
      private String size;
  
      PhoneBook(int pages, String city) {
          super();
          area = city;
          if (pages &gt; 300) {
              size = "big";
          } else {
              size = "small";
          }
      }
  
      public display() {
          System.out.println( area + pages + size);
      }
  }
  
  class Book {
  
      protected int pages;
  
      public Book(int pages) {
          pages = pages;
      }
  
      public int getPages() {
          return pages;
      }
  }
  </code></pre>