Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static long obdVersionStringToLong(String obdVerison) {
        if ("".equals(obdVerison))
            return 0;
        if (obdVerison.endsWith("S"))
            obdVerison = obdVerison.substring(0, obdVerison.length() - 1);
        String[] obdVersionArray = obdVerison.split("\\.");
        return Long.valueOf(obdVersionArray[0] + obdVersionArray[1] + obdVersionArray[2]);
    }
}