load from a file object Enum
<p>I would load from a file a string and put in in a object enum.</p>

<p>I create into a class this:</p>

<pre><code>public Passenger{

private String pass_name;
public enum State{

b,c,d;

};
....

State reser;

public Passenger(String n,State r)
      pass_name=n;
      reser=r;
}
</code></pre>

<p>in another file I want read a file and put the string in the way i can create an object passenger such: </p>

<pre><code>Passenger p=new Passenger(p_name,What should i put here)?
</code></pre>

<p>here is the structure of my file:</p>

<pre><code>cod
passenger_name
reverved
</code></pre>

<p>cod and passenger will be rapresented by String while reserved should be rapresented through enum. I will read the file:</p>

<pre><code> BufferedReader reader=new BufferedReader(new FileReader(fname));

 String cod=reader.readLine();
 while(cod!=null){
      String p_name=reader.readLine();
      how can i load a enum type?

      Passenger p=new Passenger(p_name,What should i put here)?
      cod=reader.readLine();

 }
</code></pre>
