Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * 
     * @param variation
     * @return
     */
    public static double parseVariation(String variation) {
        double var = 0;
        if ((null == variation) || (variation.length() < 3)) {
            return 0;
        } else {
            var = Double.parseDouble(variation.substring(0, 2));
            if (variation.contains("E")) {
                var = -var;
            }
        }
        return var;
    }
}