I’m completely stumped.. Seems like there’d be a simple solution
private Byte[] arrayOfBytes = null;
public Data(String input) {
arrayOfBytes = new Byte[input.getBytes().length];
arrayOfBytes = input.getBytes();
}
Throws the follwing error:
incompatible types
required: java.lang.Byte[]
found: byte[]
getBytes()from String returns abyte[]and you are trying to affect it to aByte[].byteis a primitive whereasByteis a wrapper class (kind of like Integer and int).What you can do is change :
to :