I was told and read that in java for a byte can represent values from -128 to 127 but when I write byte x = 2.5; it gives me an error can a byte only represent integers from -128 to 127 not number between the integers?
One more question why can't I say float x = 2.5; It gives me an error it wants me to say double x = 2,5;
doesn't float represent every decimal number?
One more question why can't I say float x = 2.5; It gives me an error it wants me to say double x = 2,5;
doesn't float represent every decimal number?
Comment