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 byte2float(byte[] b) {
        int value;
        value = b[0];
        value &= 0xff;
        value |= ((long) b[1] << 8);
        value &= 0xffff;
        value |= ((long) b[2] << 16);
        value &= 0xffffff;
        value |= ((long) b[3] << 24);
        return Float.intBitsToFloat(value);
    }
}