Here you can find the source of negative(int b)
Parameter | Description |
---|---|
b | the byte to check. |
public static int negative(int b)
//package com.java2s; public class Main { /**// w w w . j a va2 s . c o m * Constant-time determine if byte is negative. * * @param b the byte to check. * @return 1 if the byte is negative, 0 otherwise. */ public static int negative(int b) { return (b >> 8) & 1; } }