Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static float safeParseFloat(String str) {
        float result = 0.f;
        try {
            result = Float.parseFloat(str);
        } catch (NumberFormatException e) {
            result = 0.f;
        }
        return result;
    }
}