Java Integer Create toInt(short s0, short s1)

Here you can find the source of toInt(short s0, short s1)

Description

Returns an int built from two shorts.

License

Open Source License

Parameter

Parameter Description
s0 the least significant short
s1 the most significant short

Declaration

public static int toInt(short s0, short s1) 

Method Source Code

//package com.java2s;

public class Main {
    /**// w w w .  j av  a2s . co m
     * Returns an int built from two shorts.
     *
     * @param s0    the least significant short
     * @param s1    the most significant short
     */
    public static int toInt(short s0, short s1) {
        return (s0 & 0xFFFF) | (s1 << 16);
    }
}

Related

  1. toInt(Object value, int defaultValue)
  2. toInt(Object value, int nullValue)
  3. toInt(Object vo)
  4. toInt(short leftShort, short rightShort)
  5. ToInt(short n1, short n2)
  6. toInt(short x, short y)
  7. toInt(short[] arr)
  8. toInt(String arr, String separator)
  9. toInt(String chars)