fork(2) download
/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static int toInt16(byte high, byte low) {
		int res = (high << 8);
		res |= (low & 0xFF);
		return res & 0xFFFF;
	}
	public static void main (String[] args) throws java.lang.Exception
	{
		byte[] b = new byte[] {(byte)0x05, (byte)0xE0};
		int a = toInt16(b[0], b[1]);
		System.out.println(Integer.toString(a, 16));
	}
}
Success #stdin #stdout 0.1s 320320KB
stdin
Standard input is empty
stdout
5e0