Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    private static float getVersion(String msg, String sign) {
        float version = -1.0F;
        if ((null != msg) && (!"".equals(msg)) && (null != sign) && (!"".equals(sign))) {
            String ver = msg.substring(msg.indexOf(sign) + 1, msg.length());
            if ((null != ver) && (!"".equals(ver))) {
                version = Float.valueOf(ver).floatValue();
            }
        }
        return version;
    }
}