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 hexToFloat(String s) {
        int intBits = 0;
        float result = 0;
        try {
            intBits = Integer.parseInt(s, 16);
            result = Float.intBitsToFloat(intBits);
        } catch (NumberFormatException e) {
            e.printStackTrace();
        }
        return result;

    }
}