How to initailize byte array of 100 bytes in java with all 0's -
how initialize byte array of 100 bytes in java 0's. want create 100 byte array , initialize 0's
a new byte array automatically initialized zeroes. don't have anything.
the more general approach initializing other values, use arrays
class.
import java.util.arrays; byte[] bytes = new byte[100]; arrays.fill( bytes, (byte) 1 );
Comments
Post a Comment