Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    private static final int FULL_ONE_SHORT = 0xffff;

    /**
     * Merge short
     *
     * @param short1
     *            int1
     * @param short2
     *            int2
     *
     * @return int
     */
    public static int mergeShort(int short1, int short2) {
        int tmp = 0;
        tmp |= short1 << Short.SIZE;
        tmp |= short2 & FULL_ONE_SHORT;
        return tmp;

    }
}