public class FloatStringConvTest
{
  public static void main(String args[]) {
    String fstr = new String("3.14");
    try {
      Float f = new Float(fstr);
      System.out.println("PASSED: 3.14 = " + f);
    } catch (NumberFormatException nfe) {
      System.out.println("FAILED: caught exception: " + nfe.getMessage());
    }
    try {
      Float g = new Float(null);
      System.out.println("FAILED: null");
    } catch (NullPointerException npe) {
      System.out.println("PASSED: caught NullPointerException: " + npe.getMessage());
    }

  }
}
