Contact: aviboots(AT)netvision.net.il
40,875 questions
53,283 answers
573 users
public class MyClass { public static void main(String args[]) { byte[] bytes = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x65}; for (byte b : bytes) { System.out.print(b + " "); } } } /* run: 0 1 2 3 4 5 6 7 8 101 */
public class MyClass { public static void main(String args[]) { byte[] bytes = new byte[10]; for (int i = 0; i < 10; i++) { bytes[i] = (byte)i; } for (byte b : bytes) { System.out.print(b + " "); } } } /* run: 0 1 2 3 4 5 6 7 8 9 */