compare To object enum
<p>I have to create a method which tests if two object enum are equal.</p>

<p>Here is the code:</p>

<pre><code>public Passenger{
     private String name_pass;
     public enum StatePass{
          b,c,p
     };
     private StatePass state;

     public Passenger(String name_pass,StatePass state){
            this.name_pass=name_pass;
            this.state=state;
     }

     public boolean isConfirmed(){
          if()
              return true;

          return false;      
     }
}  
</code></pre>

<p>Inside the <code>if()</code> I have to check if the field state is equals to <code>p</code>.</p>

<p>How can I do that?</p>
