Here you can find the source of generateRandomByte()
public static final byte generateRandomByte()
//package com.java2s; public class Main { public static final byte generateRandomByte() { return (byte) (Math.random() * 0xFF); }/* ww w . ja v a2 s. c o m*/ }