Returns the value of the indexed component in the specified array object, as a
byte .

package com.logicbig.example.array;
import java.lang.reflect.Array;
public class GetByteExample2 {
public static void main(String... args) {
Byte[] arr = {1, 2, 3, 4};
byte aByte = Array.getByte(arr, 3);
System.out.println(aByte);
}
}
Output
java.lang.IllegalArgumentException: Argument is not an array of primitive type
at java.lang.reflect.Array.getByte (Native Method)
at com.logicbig.example.array.GetByteExample2.main (GetByteExample2.java:14)
at java.lang.reflect.Method.invoke (Method.java:566)
at java.lang.Thread.run (Thread.java:834)