title: error : cannot find symbol java for inner class
body: <p>I am teaching myself socket programming using <code>java</code>, and I am encountering this problem while compiling . I have declared an inner class <code>Book</code> inside the main class <code>library_s</code> and the compiler is not recognizing the variable <code>Status</code> defined in the class <code>Book</code>. I am using <code>Book</code> as a <code>static class</code> because I read that enums only exist in static classes. I wanted an analog to <code>"struct"</code> in C because I am only familiar with that. I have looked at various other similar errors,, but none of them are helpful. Please help out. Thank you!</p>
  
  <pre><code>public class library_s extends Thread{
  
  private ServerSocket lib_server;
  
  LinkedList&lt;Book&gt; library = new LinkedList&lt;Book&gt;();
  
  //constructor
  
    public library_s(int port) throws IOException{
      lib_server = new ServerSocket(port);
      lib_server.setSoTimeout(10000);
      }
  
  public void run(){
  
  Socket server = lib_server.accept();
      System.out.println("Connected to " + server.getRemoteSocketAddress());
  
      DataInputStream is = new DataInputStream(server.getInputStream());
  
      DataOutputStream os = new DataOutputStream(server.getOutputStream());
  
      for(library b : library){
        if(b.BookName == is.readUTF(){
             if(b.Status == FORISSUE){
           //enter rest of the body here
         }
        }
  
       }
  
     public static class Book{
      public String BookName;
      public static enum Status {FORISSUE, ISSUED, RENEW, RESERVE};
  
      public Book(String bn){
              this.BookName = bn;
              this.Status =   FORISSUE;
      }
  }
  
  public static void main(String [] args){
  int port = Integer.parseInt(args[0]);
  try{
      Thread t = new library_s(port);
      t.start();
  } catch (IOException e){
      e.printStackTrace();
     }
    }
   }
  }
  </code></pre>
  
  <p>The compiler gives error</p>
  
  <pre><code>library_s.java:64: error: cannot find symbol
      if(b.Status == FORISSUE){           
          ^
  symbol:   variable Status
  location: variable b of type Book
  library_s.java:64: error: cannot find symbol
      if(b.Status == FORISSUE){           
                     ^
  </code></pre>