Does a more natural way to represent those numbers without the use of casting exist in Java?
float tolerance = (float) 8.0e-7;
byte[] data = new byte[]{(byte) 0xFF , (byte) 0x15};
Not using casting on those instances just doesn't work at all, and it just looks weird when you are defining constants of a primitive type and you have to use casting to represent it (it is like you are saying that Java doesn't support those data types naturally which is ridiculous).
I understand that for the float number you can represent it like this:
float tolerance = 0.0000008f;
but it is just almost unreadable in this form.