Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {

    public static String interceptionString(int version) {
        String st = Integer.toHexString(version).toString();
        int a = Integer.valueOf(st.substring(0, 1));
        int b = Integer.valueOf(st.substring(1, 3));
        int c = Integer.valueOf(st.substring(3, 5));
        st = "v" + a + "." + b + "." + c;
        return st;
    }
}